coordinode 2.1.1__tar.gz → 4.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {coordinode-2.1.1 → coordinode-4.0.0}/.gitignore +0 -6
- {coordinode-2.1.1 → coordinode-4.0.0}/LICENSE +1 -1
- {coordinode-2.1.1 → coordinode-4.0.0}/PKG-INFO +26 -4
- {coordinode-2.1.1 → coordinode-4.0.0}/README.md +25 -3
- {coordinode-2.1.1 → coordinode-4.0.0}/coordinode/__init__.py +5 -0
- coordinode-4.0.0/coordinode/_proto/coordinode/internode/handshake_pb2.py +38 -0
- coordinode-4.0.0/coordinode/_proto/coordinode/internode/handshake_pb2.pyi +11 -0
- coordinode-4.0.0/coordinode/_proto/coordinode/internode/handshake_pb2_grpc.py +132 -0
- {coordinode-2.1.1 → coordinode-4.0.0}/coordinode/_proto/coordinode/v1/admin/cluster_pb2_grpc.py +13 -12
- coordinode-4.0.0/coordinode/_proto/coordinode/v1/graph/graph_pb2.py +85 -0
- {coordinode-2.1.1 → coordinode-4.0.0}/coordinode/_proto/coordinode/v1/graph/graph_pb2.pyi +4 -2
- coordinode-4.0.0/coordinode/_proto/coordinode/v1/query/cypher_pb2.py +89 -0
- {coordinode-2.1.1 → coordinode-4.0.0}/coordinode/_proto/coordinode/v1/query/cypher_pb2.pyi +28 -8
- coordinode-4.0.0/coordinode/_proto/coordinode/v1/replication/cdc_pb2.py +62 -0
- {coordinode-2.1.1 → coordinode-4.0.0}/coordinode/_proto/coordinode/v1/replication/cdc_pb2.pyi +56 -2
- coordinode-4.0.0/coordinode/_proto/coordinode/v1/replication/cdc_pb2_grpc.py +243 -0
- coordinode-4.0.0/coordinode/_proto/coordinode/v1/replication/consistency_pb2.py +48 -0
- {coordinode-2.1.1 → coordinode-4.0.0}/coordinode/_proto/coordinode/v1/replication/consistency_pb2.pyi +34 -18
- {coordinode-2.1.1 → coordinode-4.0.0}/coordinode/_proto/coordinode/v1/replication/raft_pb2.py +6 -6
- {coordinode-2.1.1 → coordinode-4.0.0}/coordinode/_proto/coordinode/v1/replication/raft_pb2.pyi +4 -2
- coordinode-4.0.0/coordinode/_proto/coordinode/v1/session/session_pb2.py +91 -0
- {coordinode-2.1.1 → coordinode-4.0.0}/coordinode/_proto/coordinode/v1/session/session_pb2.pyi +94 -12
- {coordinode-2.1.1 → coordinode-4.0.0}/coordinode/_proto/coordinode/v1/session/session_pb2_grpc.py +15 -9
- coordinode-4.0.0/coordinode/_proto/coordinode/v2/graph/__init__.py +0 -0
- coordinode-4.0.0/coordinode/_proto/coordinode/v2/graph/schema_pb2.py +104 -0
- coordinode-4.0.0/coordinode/_proto/coordinode/v2/graph/schema_pb2.pyi +296 -0
- coordinode-4.0.0/coordinode/_proto/coordinode/v2/graph/schema_pb2_grpc.py +400 -0
- coordinode-4.0.0/coordinode/_proto/google/__init__.py +0 -0
- coordinode-4.0.0/coordinode/_proto/google/api/__init__.py +0 -0
- coordinode-4.0.0/coordinode/_proto/google/rpc/__init__.py +0 -0
- coordinode-4.0.0/coordinode/_proto/google/rpc/status_pb2.py +38 -0
- coordinode-4.0.0/coordinode/_proto/google/rpc/status_pb2.pyi +18 -0
- coordinode-4.0.0/coordinode/_proto/google/rpc/status_pb2_grpc.py +24 -0
- {coordinode-2.1.1 → coordinode-4.0.0}/coordinode/_version.py +2 -2
- {coordinode-2.1.1 → coordinode-4.0.0}/coordinode/client.py +499 -144
- coordinode-2.1.1/coordinode/_proto/coordinode/v1/graph/graph_pb2.py +0 -85
- coordinode-2.1.1/coordinode/_proto/coordinode/v1/graph/schema_pb2.py +0 -75
- coordinode-2.1.1/coordinode/_proto/coordinode/v1/graph/schema_pb2.pyi +0 -181
- coordinode-2.1.1/coordinode/_proto/coordinode/v1/graph/schema_pb2_grpc.py +0 -233
- coordinode-2.1.1/coordinode/_proto/coordinode/v1/query/cypher_pb2.py +0 -87
- coordinode-2.1.1/coordinode/_proto/coordinode/v1/replication/cdc_pb2.py +0 -48
- coordinode-2.1.1/coordinode/_proto/coordinode/v1/replication/cdc_pb2_grpc.py +0 -127
- coordinode-2.1.1/coordinode/_proto/coordinode/v1/replication/consistency_pb2.py +0 -44
- coordinode-2.1.1/coordinode/_proto/coordinode/v1/session/session_pb2.py +0 -75
- {coordinode-2.1.1 → coordinode-4.0.0}/NOTICE +0 -0
- {coordinode-2.1.1 → coordinode-4.0.0}/coordinode/_proto/__init__.py +0 -0
- {coordinode-2.1.1 → coordinode-4.0.0}/coordinode/_proto/coordinode/__init__.py +0 -0
- {coordinode-2.1.1/coordinode/_proto/coordinode/v1 → coordinode-4.0.0/coordinode/_proto/coordinode/internode}/__init__.py +0 -0
- {coordinode-2.1.1/coordinode/_proto/coordinode/v1/admin → coordinode-4.0.0/coordinode/_proto/coordinode/v1}/__init__.py +0 -0
- {coordinode-2.1.1/coordinode/_proto/coordinode/v1/common → coordinode-4.0.0/coordinode/_proto/coordinode/v1/admin}/__init__.py +0 -0
- {coordinode-2.1.1 → coordinode-4.0.0}/coordinode/_proto/coordinode/v1/admin/cluster_pb2.py +0 -0
- {coordinode-2.1.1 → coordinode-4.0.0}/coordinode/_proto/coordinode/v1/admin/cluster_pb2.pyi +0 -0
- {coordinode-2.1.1/coordinode/_proto/coordinode/v1/graph → coordinode-4.0.0/coordinode/_proto/coordinode/v1/common}/__init__.py +0 -0
- {coordinode-2.1.1 → coordinode-4.0.0}/coordinode/_proto/coordinode/v1/common/pagination_pb2.py +0 -0
- {coordinode-2.1.1 → coordinode-4.0.0}/coordinode/_proto/coordinode/v1/common/pagination_pb2.pyi +0 -0
- {coordinode-2.1.1 → coordinode-4.0.0}/coordinode/_proto/coordinode/v1/common/pagination_pb2_grpc.py +0 -0
- {coordinode-2.1.1 → coordinode-4.0.0}/coordinode/_proto/coordinode/v1/common/types_pb2.py +0 -0
- {coordinode-2.1.1 → coordinode-4.0.0}/coordinode/_proto/coordinode/v1/common/types_pb2.pyi +0 -0
- {coordinode-2.1.1 → coordinode-4.0.0}/coordinode/_proto/coordinode/v1/common/types_pb2_grpc.py +0 -0
- {coordinode-2.1.1/coordinode/_proto/coordinode/v1/health → coordinode-4.0.0/coordinode/_proto/coordinode/v1/graph}/__init__.py +0 -0
- {coordinode-2.1.1 → coordinode-4.0.0}/coordinode/_proto/coordinode/v1/graph/blob_pb2.py +0 -0
- {coordinode-2.1.1 → coordinode-4.0.0}/coordinode/_proto/coordinode/v1/graph/blob_pb2.pyi +0 -0
- {coordinode-2.1.1 → coordinode-4.0.0}/coordinode/_proto/coordinode/v1/graph/blob_pb2_grpc.py +0 -0
- {coordinode-2.1.1 → coordinode-4.0.0}/coordinode/_proto/coordinode/v1/graph/graph_pb2_grpc.py +0 -0
- {coordinode-2.1.1/coordinode/_proto/coordinode/v1/query → coordinode-4.0.0/coordinode/_proto/coordinode/v1/health}/__init__.py +0 -0
- {coordinode-2.1.1 → coordinode-4.0.0}/coordinode/_proto/coordinode/v1/health/health_pb2.py +0 -0
- {coordinode-2.1.1 → coordinode-4.0.0}/coordinode/_proto/coordinode/v1/health/health_pb2.pyi +0 -0
- {coordinode-2.1.1 → coordinode-4.0.0}/coordinode/_proto/coordinode/v1/health/health_pb2_grpc.py +0 -0
- {coordinode-2.1.1/coordinode/_proto/coordinode/v1/replication → coordinode-4.0.0/coordinode/_proto/coordinode/v1/query}/__init__.py +0 -0
- {coordinode-2.1.1 → coordinode-4.0.0}/coordinode/_proto/coordinode/v1/query/cypher_pb2_grpc.py +0 -0
- {coordinode-2.1.1 → coordinode-4.0.0}/coordinode/_proto/coordinode/v1/query/text_pb2.py +0 -0
- {coordinode-2.1.1 → coordinode-4.0.0}/coordinode/_proto/coordinode/v1/query/text_pb2.pyi +0 -0
- {coordinode-2.1.1 → coordinode-4.0.0}/coordinode/_proto/coordinode/v1/query/text_pb2_grpc.py +0 -0
- {coordinode-2.1.1 → coordinode-4.0.0}/coordinode/_proto/coordinode/v1/query/vector_pb2.py +0 -0
- {coordinode-2.1.1 → coordinode-4.0.0}/coordinode/_proto/coordinode/v1/query/vector_pb2.pyi +0 -0
- {coordinode-2.1.1 → coordinode-4.0.0}/coordinode/_proto/coordinode/v1/query/vector_pb2_grpc.py +0 -0
- {coordinode-2.1.1/coordinode/_proto/coordinode/v1/session → coordinode-4.0.0/coordinode/_proto/coordinode/v1/replication}/__init__.py +0 -0
- {coordinode-2.1.1 → coordinode-4.0.0}/coordinode/_proto/coordinode/v1/replication/consistency_pb2_grpc.py +0 -0
- {coordinode-2.1.1 → coordinode-4.0.0}/coordinode/_proto/coordinode/v1/replication/raft_pb2_grpc.py +0 -0
- {coordinode-2.1.1 → coordinode-4.0.0}/coordinode/_proto/coordinode/v1/replication/transfer_pb2.py +0 -0
- {coordinode-2.1.1 → coordinode-4.0.0}/coordinode/_proto/coordinode/v1/replication/transfer_pb2.pyi +0 -0
- {coordinode-2.1.1 → coordinode-4.0.0}/coordinode/_proto/coordinode/v1/replication/transfer_pb2_grpc.py +0 -0
- {coordinode-2.1.1/coordinode/_proto/google → coordinode-4.0.0/coordinode/_proto/coordinode/v1/session}/__init__.py +0 -0
- {coordinode-2.1.1/coordinode/_proto/google/api → coordinode-4.0.0/coordinode/_proto/coordinode/v2}/__init__.py +0 -0
- {coordinode-2.1.1 → coordinode-4.0.0}/coordinode/_proto/google/api/annotations_pb2.py +0 -0
- {coordinode-2.1.1 → coordinode-4.0.0}/coordinode/_proto/google/api/annotations_pb2.pyi +0 -0
- {coordinode-2.1.1 → coordinode-4.0.0}/coordinode/_proto/google/api/annotations_pb2_grpc.py +0 -0
- {coordinode-2.1.1 → coordinode-4.0.0}/coordinode/_proto/google/api/http_pb2.py +0 -0
- {coordinode-2.1.1 → coordinode-4.0.0}/coordinode/_proto/google/api/http_pb2.pyi +0 -0
- {coordinode-2.1.1 → coordinode-4.0.0}/coordinode/_proto/google/api/http_pb2_grpc.py +0 -0
- {coordinode-2.1.1 → coordinode-4.0.0}/coordinode/_source.py +0 -0
- {coordinode-2.1.1 → coordinode-4.0.0}/coordinode/_types.py +0 -0
- {coordinode-2.1.1 → coordinode-4.0.0}/pyproject.toml +0 -0
|
@@ -22,10 +22,4 @@ coordinode/coordinode/_version.py
|
|
|
22
22
|
langchain-coordinode/langchain_coordinode/_version.py
|
|
23
23
|
llama-index-coordinode/llama_index/graph_stores/coordinode/_version.py
|
|
24
24
|
|
|
25
|
-
# Local dev / arch docs — not part of the SDK
|
|
26
|
-
GAPS.md
|
|
27
|
-
CLAUDE.md
|
|
28
|
-
DEVLOG*.md
|
|
29
|
-
|
|
30
25
|
**/.ipynb_checkpoints/
|
|
31
|
-
.claude/
|
|
@@ -187,7 +187,7 @@
|
|
|
187
187
|
same "printed page" as the copyright notice for easier
|
|
188
188
|
identification within third-party archives.
|
|
189
189
|
|
|
190
|
-
Copyright
|
|
190
|
+
Copyright 2026 Dmitry Prudnikov
|
|
191
191
|
|
|
192
192
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
193
|
you may not use this file except in compliance with the License.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: coordinode
|
|
3
|
-
Version:
|
|
3
|
+
Version: 4.0.0
|
|
4
4
|
Summary: Python client for CoordiNode — graph + vector + full-text database
|
|
5
5
|
Project-URL: Homepage, https://github.com/structured-world/coordinode
|
|
6
6
|
Project-URL: Repository, https://github.com/structured-world/coordinode-python
|
|
@@ -203,8 +203,12 @@ db.cypher(
|
|
|
203
203
|
read_concern="majority",
|
|
204
204
|
)
|
|
205
205
|
|
|
206
|
-
#
|
|
207
|
-
|
|
206
|
+
# Writes default to a journaled majority. Weaken it explicitly per write,
|
|
207
|
+
# only for data that may be lost with its leader:
|
|
208
|
+
from coordinode import WriteConcern
|
|
209
|
+
|
|
210
|
+
db.cypher("CREATE (n:Hit {t: timestamp()})", write_concern=1) # leader only
|
|
211
|
+
db.cypher("CREATE (n:Hit {t: timestamp()})", write_concern=WriteConcern(w=1, journal="memory"))
|
|
208
212
|
|
|
209
213
|
# Causal read: see at least the state at raft index 42. The fence is about
|
|
210
214
|
# which replica may answer, so it is the READ concern that has to be majority.
|
|
@@ -213,13 +217,31 @@ db.cypher(
|
|
|
213
217
|
after_index=42,
|
|
214
218
|
read_concern="majority",
|
|
215
219
|
)
|
|
220
|
+
|
|
221
|
+
# Write only if the node is still at the version you read.
|
|
222
|
+
node = db.get_node(node_id)
|
|
223
|
+
with db.transaction() as tx:
|
|
224
|
+
tx.cypher("MATCH (n) WHERE id(n) = $id SET n.seen = true", params={"id": node_id})
|
|
225
|
+
tx.commit(expect={node.id: node.version}) # ABORTED / REVISION_MISMATCH if it moved
|
|
226
|
+
# tx.commit_ts is when the write landed: at_timestamp=tx.commit_ts reads exactly it.
|
|
216
227
|
```
|
|
217
228
|
|
|
218
229
|
Accepted values:
|
|
219
230
|
|
|
220
231
|
- ``read_concern``: ``local`` (default) · ``majority`` · ``linearizable`` · ``snapshot``. Causal reads (``after_index`` > 0) require ``majority`` here.
|
|
221
|
-
- ``write_concern``: ``
|
|
232
|
+
- ``write_concern``: ``"majority"`` (default) · a member count (``1`` leader only, ``0`` fire-and-forget) · ``WriteConcern(w, journal, timeout_ms)`` with ``journal`` one of ``journal`` (default) · ``cache`` · ``memory``. The volatile ``cache`` and ``memory`` states are accepted only with ``w`` of 0 or 1.
|
|
222
233
|
- ``read_preference``: ``primary`` (default) · ``primary_preferred`` · ``secondary`` · ``secondary_preferred`` · ``nearest``
|
|
234
|
+
- ``vector_consistency``: ``current`` (the index as it is: fastest, may include writes newer than the read) · ``snapshot`` (index candidates filtered at the read's snapshot) · ``exact`` (every vector of the label, without the index). Omitted, the mode the read concern implies. A ``vector_consistency`` hint in the query wins.
|
|
235
|
+
- ``vector_build_wait_ms``: how long a vector search waits for an index still being built; ``0`` refuses a building index at once. Omitted, the server's default.
|
|
236
|
+
|
|
237
|
+
```python
|
|
238
|
+
db.cypher(
|
|
239
|
+
"MATCH (d:Doc) RETURN d.title AS title ORDER BY vector_distance(d.embedding, $q) LIMIT 5",
|
|
240
|
+
params={"q": query_vector},
|
|
241
|
+
vector_consistency="exact",
|
|
242
|
+
vector_build_wait_ms=0,
|
|
243
|
+
)
|
|
244
|
+
```
|
|
223
245
|
|
|
224
246
|
## Related Packages
|
|
225
247
|
|
|
@@ -171,8 +171,12 @@ db.cypher(
|
|
|
171
171
|
read_concern="majority",
|
|
172
172
|
)
|
|
173
173
|
|
|
174
|
-
#
|
|
175
|
-
|
|
174
|
+
# Writes default to a journaled majority. Weaken it explicitly per write,
|
|
175
|
+
# only for data that may be lost with its leader:
|
|
176
|
+
from coordinode import WriteConcern
|
|
177
|
+
|
|
178
|
+
db.cypher("CREATE (n:Hit {t: timestamp()})", write_concern=1) # leader only
|
|
179
|
+
db.cypher("CREATE (n:Hit {t: timestamp()})", write_concern=WriteConcern(w=1, journal="memory"))
|
|
176
180
|
|
|
177
181
|
# Causal read: see at least the state at raft index 42. The fence is about
|
|
178
182
|
# which replica may answer, so it is the READ concern that has to be majority.
|
|
@@ -181,13 +185,31 @@ db.cypher(
|
|
|
181
185
|
after_index=42,
|
|
182
186
|
read_concern="majority",
|
|
183
187
|
)
|
|
188
|
+
|
|
189
|
+
# Write only if the node is still at the version you read.
|
|
190
|
+
node = db.get_node(node_id)
|
|
191
|
+
with db.transaction() as tx:
|
|
192
|
+
tx.cypher("MATCH (n) WHERE id(n) = $id SET n.seen = true", params={"id": node_id})
|
|
193
|
+
tx.commit(expect={node.id: node.version}) # ABORTED / REVISION_MISMATCH if it moved
|
|
194
|
+
# tx.commit_ts is when the write landed: at_timestamp=tx.commit_ts reads exactly it.
|
|
184
195
|
```
|
|
185
196
|
|
|
186
197
|
Accepted values:
|
|
187
198
|
|
|
188
199
|
- ``read_concern``: ``local`` (default) · ``majority`` · ``linearizable`` · ``snapshot``. Causal reads (``after_index`` > 0) require ``majority`` here.
|
|
189
|
-
- ``write_concern``: ``
|
|
200
|
+
- ``write_concern``: ``"majority"`` (default) · a member count (``1`` leader only, ``0`` fire-and-forget) · ``WriteConcern(w, journal, timeout_ms)`` with ``journal`` one of ``journal`` (default) · ``cache`` · ``memory``. The volatile ``cache`` and ``memory`` states are accepted only with ``w`` of 0 or 1.
|
|
190
201
|
- ``read_preference``: ``primary`` (default) · ``primary_preferred`` · ``secondary`` · ``secondary_preferred`` · ``nearest``
|
|
202
|
+
- ``vector_consistency``: ``current`` (the index as it is: fastest, may include writes newer than the read) · ``snapshot`` (index candidates filtered at the read's snapshot) · ``exact`` (every vector of the label, without the index). Omitted, the mode the read concern implies. A ``vector_consistency`` hint in the query wins.
|
|
203
|
+
- ``vector_build_wait_ms``: how long a vector search waits for an index still being built; ``0`` refuses a building index at once. Omitted, the server's default.
|
|
204
|
+
|
|
205
|
+
```python
|
|
206
|
+
db.cypher(
|
|
207
|
+
"MATCH (d:Doc) RETURN d.title AS title ORDER BY vector_distance(d.embedding, $q) LIMIT 5",
|
|
208
|
+
params={"q": query_vector},
|
|
209
|
+
vector_consistency="exact",
|
|
210
|
+
vector_build_wait_ms=0,
|
|
211
|
+
)
|
|
212
|
+
```
|
|
191
213
|
|
|
192
214
|
## Related Packages
|
|
193
215
|
|
|
@@ -22,6 +22,7 @@ from coordinode._types import MultiVector, Path
|
|
|
22
22
|
from coordinode.client import (
|
|
23
23
|
AsyncCoordinodeClient,
|
|
24
24
|
AsyncTransaction,
|
|
25
|
+
ConstraintInfo,
|
|
25
26
|
CoordinodeClient,
|
|
26
27
|
EdgeResult,
|
|
27
28
|
EdgeTypeInfo,
|
|
@@ -33,6 +34,7 @@ from coordinode.client import (
|
|
|
33
34
|
Transaction,
|
|
34
35
|
TraverseResult,
|
|
35
36
|
VectorResult,
|
|
37
|
+
WriteConcern,
|
|
36
38
|
)
|
|
37
39
|
|
|
38
40
|
try:
|
|
@@ -52,6 +54,8 @@ __all__ = [
|
|
|
52
54
|
# requires the constructor, not just the shape.
|
|
53
55
|
"MultiVector",
|
|
54
56
|
"Path",
|
|
57
|
+
# How a write is acknowledged: member count or majority, and how durably.
|
|
58
|
+
"WriteConcern",
|
|
55
59
|
"NodeResult",
|
|
56
60
|
"EdgeResult",
|
|
57
61
|
"VectorResult",
|
|
@@ -59,6 +63,7 @@ __all__ = [
|
|
|
59
63
|
"LabelInfo",
|
|
60
64
|
"EdgeTypeInfo",
|
|
61
65
|
"PropertyDefinitionInfo",
|
|
66
|
+
"ConstraintInfo",
|
|
62
67
|
"TextIndexInfo",
|
|
63
68
|
"TraverseResult",
|
|
64
69
|
]
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# NO CHECKED-IN PROTOBUF GENCODE
|
|
4
|
+
# source: coordinode/internode/handshake.proto
|
|
5
|
+
# Protobuf Python Version: 7.35.1
|
|
6
|
+
"""Generated protocol buffer code."""
|
|
7
|
+
from google.protobuf import descriptor as _descriptor
|
|
8
|
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
9
|
+
from google.protobuf import runtime_version as _runtime_version
|
|
10
|
+
from google.protobuf import symbol_database as _symbol_database
|
|
11
|
+
from google.protobuf.internal import builder as _builder
|
|
12
|
+
_runtime_version.ValidateProtobufRuntimeVersion(
|
|
13
|
+
_runtime_version.Domain.PUBLIC,
|
|
14
|
+
7,
|
|
15
|
+
35,
|
|
16
|
+
1,
|
|
17
|
+
'',
|
|
18
|
+
'coordinode/internode/handshake.proto'
|
|
19
|
+
)
|
|
20
|
+
# @@protoc_insertion_point(imports)
|
|
21
|
+
|
|
22
|
+
_sym_db = _symbol_database.Default()
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n$coordinode/internode/handshake.proto\x12\x14\x63oordinode.internode\"!\n\x0fHandshakeRecord\x12\x0e\n\x06record\x18\x01 \x01(\x0c\x32l\n\x10VersionHandshake\x12X\n\x08\x45xchange\x12%.coordinode.internode.HandshakeRecord\x1a%.coordinode.internode.HandshakeRecordb\x06proto3')
|
|
28
|
+
|
|
29
|
+
_globals = globals()
|
|
30
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
31
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'coordinode.internode.handshake_pb2', _globals)
|
|
32
|
+
if not _descriptor._USE_C_DESCRIPTORS:
|
|
33
|
+
DESCRIPTOR._loaded_options = None
|
|
34
|
+
_globals['_HANDSHAKERECORD']._serialized_start=62
|
|
35
|
+
_globals['_HANDSHAKERECORD']._serialized_end=95
|
|
36
|
+
_globals['_VERSIONHANDSHAKE']._serialized_start=97
|
|
37
|
+
_globals['_VERSIONHANDSHAKE']._serialized_end=205
|
|
38
|
+
# @@protoc_insertion_point(module_scope)
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
from google.protobuf import descriptor as _descriptor
|
|
2
|
+
from google.protobuf import message as _message
|
|
3
|
+
from typing import ClassVar as _ClassVar, Optional as _Optional
|
|
4
|
+
|
|
5
|
+
DESCRIPTOR: _descriptor.FileDescriptor
|
|
6
|
+
|
|
7
|
+
class HandshakeRecord(_message.Message):
|
|
8
|
+
__slots__ = ("record",)
|
|
9
|
+
RECORD_FIELD_NUMBER: _ClassVar[int]
|
|
10
|
+
record: bytes
|
|
11
|
+
def __init__(self, record: _Optional[bytes] = ...) -> None: ...
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
|
|
2
|
+
"""Client and server classes corresponding to protobuf-defined services."""
|
|
3
|
+
import grpc
|
|
4
|
+
import warnings
|
|
5
|
+
|
|
6
|
+
from coordinode.internode import handshake_pb2 as coordinode_dot_internode_dot_handshake__pb2
|
|
7
|
+
|
|
8
|
+
GRPC_GENERATED_VERSION = '1.83.1'
|
|
9
|
+
GRPC_VERSION = grpc.__version__
|
|
10
|
+
_version_not_supported = False
|
|
11
|
+
|
|
12
|
+
try:
|
|
13
|
+
from grpc._utilities import first_version_is_lower
|
|
14
|
+
_version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
|
|
15
|
+
except ImportError:
|
|
16
|
+
_version_not_supported = True
|
|
17
|
+
|
|
18
|
+
if _version_not_supported:
|
|
19
|
+
raise RuntimeError(
|
|
20
|
+
f'The grpc package installed is at version {GRPC_VERSION},'
|
|
21
|
+
+ ' but the generated code in coordinode/internode/handshake_pb2_grpc.py depends on'
|
|
22
|
+
+ f' grpcio>={GRPC_GENERATED_VERSION}.'
|
|
23
|
+
+ f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
|
|
24
|
+
+ f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class VersionHandshakeStub:
|
|
29
|
+
"""The version handshake between two members of a consensus group.
|
|
30
|
+
|
|
31
|
+
This file is frozen for the life of the product: its package, service,
|
|
32
|
+
method and messages never change, so that members of any two releases can
|
|
33
|
+
tell each other which version they run. Members whose versions differ
|
|
34
|
+
exchange nothing but this.
|
|
35
|
+
|
|
36
|
+
The same record also travels in the `cn-version-handshake-bin` request
|
|
37
|
+
and response metadata of every other inter-node call; a call whose record
|
|
38
|
+
does not match the receiver's version is refused before its payload is
|
|
39
|
+
read.
|
|
40
|
+
"""
|
|
41
|
+
|
|
42
|
+
def __init__(self, channel):
|
|
43
|
+
"""Constructor.
|
|
44
|
+
|
|
45
|
+
Args:
|
|
46
|
+
channel: A grpc.Channel.
|
|
47
|
+
"""
|
|
48
|
+
self.Exchange = channel.unary_unary(
|
|
49
|
+
'/coordinode.internode.VersionHandshake/Exchange',
|
|
50
|
+
request_serializer=coordinode_dot_internode_dot_handshake__pb2.HandshakeRecord.SerializeToString,
|
|
51
|
+
response_deserializer=coordinode_dot_internode_dot_handshake__pb2.HandshakeRecord.FromString,
|
|
52
|
+
_registered_method=True)
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
class VersionHandshakeServicer:
|
|
56
|
+
"""The version handshake between two members of a consensus group.
|
|
57
|
+
|
|
58
|
+
This file is frozen for the life of the product: its package, service,
|
|
59
|
+
method and messages never change, so that members of any two releases can
|
|
60
|
+
tell each other which version they run. Members whose versions differ
|
|
61
|
+
exchange nothing but this.
|
|
62
|
+
|
|
63
|
+
The same record also travels in the `cn-version-handshake-bin` request
|
|
64
|
+
and response metadata of every other inter-node call; a call whose record
|
|
65
|
+
does not match the receiver's version is refused before its payload is
|
|
66
|
+
read.
|
|
67
|
+
"""
|
|
68
|
+
|
|
69
|
+
def Exchange(self, request, context):
|
|
70
|
+
"""Exchange version records. Answered whether or not the two members
|
|
71
|
+
match; the caller compares the records itself.
|
|
72
|
+
"""
|
|
73
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
74
|
+
context.set_details('Method not implemented!')
|
|
75
|
+
raise NotImplementedError('Method not implemented!')
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
def add_VersionHandshakeServicer_to_server(servicer, server):
|
|
79
|
+
rpc_method_handlers = {
|
|
80
|
+
'Exchange': grpc.unary_unary_rpc_method_handler(
|
|
81
|
+
servicer.Exchange,
|
|
82
|
+
request_deserializer=coordinode_dot_internode_dot_handshake__pb2.HandshakeRecord.FromString,
|
|
83
|
+
response_serializer=coordinode_dot_internode_dot_handshake__pb2.HandshakeRecord.SerializeToString,
|
|
84
|
+
),
|
|
85
|
+
}
|
|
86
|
+
generic_handler = grpc.method_handlers_generic_handler(
|
|
87
|
+
'coordinode.internode.VersionHandshake', rpc_method_handlers)
|
|
88
|
+
server.add_generic_rpc_handlers((generic_handler,))
|
|
89
|
+
server.add_registered_method_handlers('coordinode.internode.VersionHandshake', rpc_method_handlers)
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
# This class is part of an EXPERIMENTAL API.
|
|
93
|
+
class VersionHandshake:
|
|
94
|
+
"""The version handshake between two members of a consensus group.
|
|
95
|
+
|
|
96
|
+
This file is frozen for the life of the product: its package, service,
|
|
97
|
+
method and messages never change, so that members of any two releases can
|
|
98
|
+
tell each other which version they run. Members whose versions differ
|
|
99
|
+
exchange nothing but this.
|
|
100
|
+
|
|
101
|
+
The same record also travels in the `cn-version-handshake-bin` request
|
|
102
|
+
and response metadata of every other inter-node call; a call whose record
|
|
103
|
+
does not match the receiver's version is refused before its payload is
|
|
104
|
+
read.
|
|
105
|
+
"""
|
|
106
|
+
|
|
107
|
+
@staticmethod
|
|
108
|
+
def Exchange(request,
|
|
109
|
+
target,
|
|
110
|
+
options=(),
|
|
111
|
+
channel_credentials=None,
|
|
112
|
+
call_credentials=None,
|
|
113
|
+
insecure=False,
|
|
114
|
+
compression=None,
|
|
115
|
+
wait_for_ready=None,
|
|
116
|
+
timeout=None,
|
|
117
|
+
metadata=None):
|
|
118
|
+
return grpc.experimental.unary_unary(
|
|
119
|
+
request,
|
|
120
|
+
target,
|
|
121
|
+
'/coordinode.internode.VersionHandshake/Exchange',
|
|
122
|
+
coordinode_dot_internode_dot_handshake__pb2.HandshakeRecord.SerializeToString,
|
|
123
|
+
coordinode_dot_internode_dot_handshake__pb2.HandshakeRecord.FromString,
|
|
124
|
+
options,
|
|
125
|
+
channel_credentials,
|
|
126
|
+
insecure,
|
|
127
|
+
call_credentials,
|
|
128
|
+
compression,
|
|
129
|
+
wait_for_ready,
|
|
130
|
+
timeout,
|
|
131
|
+
metadata,
|
|
132
|
+
_registered_method=True)
|
{coordinode-2.1.1 → coordinode-4.0.0}/coordinode/_proto/coordinode/v1/admin/cluster_pb2_grpc.py
RENAMED
|
@@ -126,18 +126,19 @@ class ClusterServiceServicer:
|
|
|
126
126
|
def DecommissionNode(self, request, context):
|
|
127
127
|
"""Gracefully decommission a node from the cluster.
|
|
128
128
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
leadership
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
129
|
+
First the quorum gate: removing node_id must still leave at least 2
|
|
130
|
+
voters, otherwise the call aborts with FAILED_PRECONDITION.
|
|
131
|
+
|
|
132
|
+
Then the leadership transfer: if node_id is the current Raft leader,
|
|
133
|
+
leadership moves to a peer before removal. For self-decommission (the
|
|
134
|
+
leader removing itself) the request is forwarded to the new leader after
|
|
135
|
+
the transfer.
|
|
136
|
+
|
|
137
|
+
Last the membership remove, change_membership(remove: node_id): the node
|
|
138
|
+
stops receiving log replication and leaves the quorum.
|
|
139
|
+
|
|
140
|
+
CE behaviour: single Raft group, all nodes hold full data. Pruning is
|
|
141
|
+
advisory: the operator deletes data on the decommissioned node manually.
|
|
141
142
|
|
|
142
143
|
Must be called on the current Raft leader, or on the node being decommissioned
|
|
143
144
|
when that node is the leader (self-decommission path).
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# NO CHECKED-IN PROTOBUF GENCODE
|
|
4
|
+
# source: coordinode/v1/graph/graph.proto
|
|
5
|
+
# Protobuf Python Version: 7.35.1
|
|
6
|
+
"""Generated protocol buffer code."""
|
|
7
|
+
from google.protobuf import descriptor as _descriptor
|
|
8
|
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
9
|
+
from google.protobuf import runtime_version as _runtime_version
|
|
10
|
+
from google.protobuf import symbol_database as _symbol_database
|
|
11
|
+
from google.protobuf.internal import builder as _builder
|
|
12
|
+
_runtime_version.ValidateProtobufRuntimeVersion(
|
|
13
|
+
_runtime_version.Domain.PUBLIC,
|
|
14
|
+
7,
|
|
15
|
+
35,
|
|
16
|
+
1,
|
|
17
|
+
'',
|
|
18
|
+
'coordinode/v1/graph/graph.proto'
|
|
19
|
+
)
|
|
20
|
+
# @@protoc_insertion_point(imports)
|
|
21
|
+
|
|
22
|
+
_sym_db = _symbol_database.Default()
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
from coordinode._proto.coordinode.v1.common import types_pb2 as coordinode_dot_v1_dot_common_dot_types__pb2
|
|
26
|
+
from coordinode._proto.coordinode.v1.common import pagination_pb2 as coordinode_dot_v1_dot_common_dot_pagination__pb2
|
|
27
|
+
from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1f\x63oordinode/v1/graph/graph.proto\x12\x13\x63oordinode.v1.graph\x1a coordinode/v1/common/types.proto\x1a%coordinode/v1/common/pagination.proto\x1a\x1cgoogle/api/annotations.proto\"\xe3\x01\n\x04Node\x12\x0f\n\x07node_id\x18\x01 \x01(\x04\x12\x0e\n\x06labels\x18\x02 \x03(\t\x12=\n\nproperties\x18\x03 \x03(\x0b\x32).coordinode.v1.graph.Node.PropertiesEntry\x12\x12\n\nelement_id\x18\x04 \x01(\t\x12\x0f\n\x07version\x18\x05 \x01(\x04\x1aV\n\x0fPropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x32\n\x05value\x18\x02 \x01(\x0b\x32#.coordinode.v1.common.PropertyValue:\x02\x38\x01\"\x85\x02\n\x04\x45\x64ge\x12\x0f\n\x07\x65\x64ge_id\x18\x01 \x01(\x04\x12\x11\n\tedge_type\x18\x02 \x01(\t\x12\x16\n\x0esource_node_id\x18\x03 \x01(\x04\x12\x16\n\x0etarget_node_id\x18\x04 \x01(\x04\x12=\n\nproperties\x18\x05 \x03(\x0b\x32).coordinode.v1.graph.Edge.PropertiesEntry\x12\x12\n\nelement_id\x18\x06 \x01(\t\x1aV\n\x0fPropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x32\n\x05value\x18\x02 \x01(\x0b\x32#.coordinode.v1.common.PropertyValue:\x02\x38\x01\"\xc7\x01\n\x11\x43reateNodeRequest\x12\x0e\n\x06labels\x18\x01 \x03(\t\x12J\n\nproperties\x18\x02 \x03(\x0b\x32\x36.coordinode.v1.graph.CreateNodeRequest.PropertiesEntry\x1aV\n\x0fPropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x32\n\x05value\x18\x02 \x01(\x0b\x32#.coordinode.v1.common.PropertyValue:\x02\x38\x01\"P\n\x17\x43reateNodesBatchRequest\x12\x35\n\x05nodes\x18\x01 \x03(\x0b\x32&.coordinode.v1.graph.CreateNodeRequest\"D\n\x18\x43reateNodesBatchResponse\x12(\n\x05nodes\x18\x01 \x03(\x0b\x32\x19.coordinode.v1.graph.Node\"!\n\x0eGetNodeRequest\x12\x0f\n\x07node_id\x18\x01 \x01(\x04\"\xfa\x01\n\x11\x43reateEdgeRequest\x12\x11\n\tedge_type\x18\x01 \x01(\t\x12\x16\n\x0esource_node_id\x18\x02 \x01(\x04\x12\x16\n\x0etarget_node_id\x18\x03 \x01(\x04\x12J\n\nproperties\x18\x04 \x03(\x0b\x32\x36.coordinode.v1.graph.CreateEdgeRequest.PropertiesEntry\x1aV\n\x0fPropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x32\n\x05value\x18\x02 \x01(\x0b\x32#.coordinode.v1.common.PropertyValue:\x02\x38\x01\"\xc7\x01\n\x0fTraverseRequest\x12\x15\n\rstart_node_id\x18\x01 \x01(\x04\x12\x11\n\tedge_type\x18\x02 \x01(\t\x12:\n\tdirection\x18\x03 \x01(\x0e\x32\'.coordinode.v1.graph.TraversalDirection\x12\x11\n\tmax_depth\x18\x04 \x01(\r\x12;\n\npagination\x18\x05 \x01(\x0b\x32\'.coordinode.v1.common.PaginationRequest\"\xa4\x01\n\x10TraverseResponse\x12(\n\x05nodes\x18\x01 \x03(\x0b\x32\x19.coordinode.v1.graph.Node\x12(\n\x05\x65\x64ges\x18\x02 \x03(\x0b\x32\x19.coordinode.v1.graph.Edge\x12<\n\npagination\x18\x03 \x01(\x0b\x32(.coordinode.v1.common.PaginationResponse*\x9a\x01\n\x12TraversalDirection\x12#\n\x1fTRAVERSAL_DIRECTION_UNSPECIFIED\x10\x00\x12 \n\x1cTRAVERSAL_DIRECTION_OUTBOUND\x10\x01\x12\x1f\n\x1bTRAVERSAL_DIRECTION_INBOUND\x10\x02\x12\x1c\n\x18TRAVERSAL_DIRECTION_BOTH\x10\x03\x32\xe2\x04\n\x0cGraphService\x12k\n\nCreateNode\x12&.coordinode.v1.graph.CreateNodeRequest\x1a\x19.coordinode.v1.graph.Node\"\x1a\x82\xd3\xe4\x93\x02\x14\"\x0f/v1/graph/nodes:\x01*\x12\x91\x01\n\x10\x43reateNodesBatch\x12,.coordinode.v1.graph.CreateNodesBatchRequest\x1a-.coordinode.v1.graph.CreateNodesBatchResponse\" \x82\xd3\xe4\x93\x02\x1a\"\x15/v1/graph/nodes:batch:\x01*\x12l\n\x07GetNode\x12#.coordinode.v1.graph.GetNodeRequest\x1a\x19.coordinode.v1.graph.Node\"!\x82\xd3\xe4\x93\x02\x1b\x12\x19/v1/graph/nodes/{node_id}\x12k\n\nCreateEdge\x12&.coordinode.v1.graph.CreateEdgeRequest\x1a\x19.coordinode.v1.graph.Edge\"\x1a\x82\xd3\xe4\x93\x02\x14\"\x0f/v1/graph/edges:\x01*\x12v\n\x08Traverse\x12$.coordinode.v1.graph.TraverseRequest\x1a%.coordinode.v1.graph.TraverseResponse\"\x1d\x82\xd3\xe4\x93\x02\x17\"\x12/v1/graph/traverse:\x01*b\x06proto3')
|
|
31
|
+
|
|
32
|
+
_globals = globals()
|
|
33
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
34
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'coordinode.v1.graph.graph_pb2', _globals)
|
|
35
|
+
if not _descriptor._USE_C_DESCRIPTORS:
|
|
36
|
+
DESCRIPTOR._loaded_options = None
|
|
37
|
+
_globals['_NODE_PROPERTIESENTRY']._loaded_options = None
|
|
38
|
+
_globals['_NODE_PROPERTIESENTRY']._serialized_options = b'8\001'
|
|
39
|
+
_globals['_EDGE_PROPERTIESENTRY']._loaded_options = None
|
|
40
|
+
_globals['_EDGE_PROPERTIESENTRY']._serialized_options = b'8\001'
|
|
41
|
+
_globals['_CREATENODEREQUEST_PROPERTIESENTRY']._loaded_options = None
|
|
42
|
+
_globals['_CREATENODEREQUEST_PROPERTIESENTRY']._serialized_options = b'8\001'
|
|
43
|
+
_globals['_CREATEEDGEREQUEST_PROPERTIESENTRY']._loaded_options = None
|
|
44
|
+
_globals['_CREATEEDGEREQUEST_PROPERTIESENTRY']._serialized_options = b'8\001'
|
|
45
|
+
_globals['_GRAPHSERVICE'].methods_by_name['CreateNode']._loaded_options = None
|
|
46
|
+
_globals['_GRAPHSERVICE'].methods_by_name['CreateNode']._serialized_options = b'\202\323\344\223\002\024\"\017/v1/graph/nodes:\001*'
|
|
47
|
+
_globals['_GRAPHSERVICE'].methods_by_name['CreateNodesBatch']._loaded_options = None
|
|
48
|
+
_globals['_GRAPHSERVICE'].methods_by_name['CreateNodesBatch']._serialized_options = b'\202\323\344\223\002\032\"\025/v1/graph/nodes:batch:\001*'
|
|
49
|
+
_globals['_GRAPHSERVICE'].methods_by_name['GetNode']._loaded_options = None
|
|
50
|
+
_globals['_GRAPHSERVICE'].methods_by_name['GetNode']._serialized_options = b'\202\323\344\223\002\033\022\031/v1/graph/nodes/{node_id}'
|
|
51
|
+
_globals['_GRAPHSERVICE'].methods_by_name['CreateEdge']._loaded_options = None
|
|
52
|
+
_globals['_GRAPHSERVICE'].methods_by_name['CreateEdge']._serialized_options = b'\202\323\344\223\002\024\"\017/v1/graph/edges:\001*'
|
|
53
|
+
_globals['_GRAPHSERVICE'].methods_by_name['Traverse']._loaded_options = None
|
|
54
|
+
_globals['_GRAPHSERVICE'].methods_by_name['Traverse']._serialized_options = b'\202\323\344\223\002\027\"\022/v1/graph/traverse:\001*'
|
|
55
|
+
_globals['_TRAVERSALDIRECTION']._serialized_start=1665
|
|
56
|
+
_globals['_TRAVERSALDIRECTION']._serialized_end=1819
|
|
57
|
+
_globals['_NODE']._serialized_start=160
|
|
58
|
+
_globals['_NODE']._serialized_end=387
|
|
59
|
+
_globals['_NODE_PROPERTIESENTRY']._serialized_start=301
|
|
60
|
+
_globals['_NODE_PROPERTIESENTRY']._serialized_end=387
|
|
61
|
+
_globals['_EDGE']._serialized_start=390
|
|
62
|
+
_globals['_EDGE']._serialized_end=651
|
|
63
|
+
_globals['_EDGE_PROPERTIESENTRY']._serialized_start=301
|
|
64
|
+
_globals['_EDGE_PROPERTIESENTRY']._serialized_end=387
|
|
65
|
+
_globals['_CREATENODEREQUEST']._serialized_start=654
|
|
66
|
+
_globals['_CREATENODEREQUEST']._serialized_end=853
|
|
67
|
+
_globals['_CREATENODEREQUEST_PROPERTIESENTRY']._serialized_start=301
|
|
68
|
+
_globals['_CREATENODEREQUEST_PROPERTIESENTRY']._serialized_end=387
|
|
69
|
+
_globals['_CREATENODESBATCHREQUEST']._serialized_start=855
|
|
70
|
+
_globals['_CREATENODESBATCHREQUEST']._serialized_end=935
|
|
71
|
+
_globals['_CREATENODESBATCHRESPONSE']._serialized_start=937
|
|
72
|
+
_globals['_CREATENODESBATCHRESPONSE']._serialized_end=1005
|
|
73
|
+
_globals['_GETNODEREQUEST']._serialized_start=1007
|
|
74
|
+
_globals['_GETNODEREQUEST']._serialized_end=1040
|
|
75
|
+
_globals['_CREATEEDGEREQUEST']._serialized_start=1043
|
|
76
|
+
_globals['_CREATEEDGEREQUEST']._serialized_end=1293
|
|
77
|
+
_globals['_CREATEEDGEREQUEST_PROPERTIESENTRY']._serialized_start=301
|
|
78
|
+
_globals['_CREATEEDGEREQUEST_PROPERTIESENTRY']._serialized_end=387
|
|
79
|
+
_globals['_TRAVERSEREQUEST']._serialized_start=1296
|
|
80
|
+
_globals['_TRAVERSEREQUEST']._serialized_end=1495
|
|
81
|
+
_globals['_TRAVERSERESPONSE']._serialized_start=1498
|
|
82
|
+
_globals['_TRAVERSERESPONSE']._serialized_end=1662
|
|
83
|
+
_globals['_GRAPHSERVICE']._serialized_start=1822
|
|
84
|
+
_globals['_GRAPHSERVICE']._serialized_end=2432
|
|
85
|
+
# @@protoc_insertion_point(module_scope)
|
|
@@ -22,7 +22,7 @@ TRAVERSAL_DIRECTION_INBOUND: TraversalDirection
|
|
|
22
22
|
TRAVERSAL_DIRECTION_BOTH: TraversalDirection
|
|
23
23
|
|
|
24
24
|
class Node(_message.Message):
|
|
25
|
-
__slots__ = ("node_id", "labels", "properties", "element_id")
|
|
25
|
+
__slots__ = ("node_id", "labels", "properties", "element_id", "version")
|
|
26
26
|
class PropertiesEntry(_message.Message):
|
|
27
27
|
__slots__ = ("key", "value")
|
|
28
28
|
KEY_FIELD_NUMBER: _ClassVar[int]
|
|
@@ -34,11 +34,13 @@ class Node(_message.Message):
|
|
|
34
34
|
LABELS_FIELD_NUMBER: _ClassVar[int]
|
|
35
35
|
PROPERTIES_FIELD_NUMBER: _ClassVar[int]
|
|
36
36
|
ELEMENT_ID_FIELD_NUMBER: _ClassVar[int]
|
|
37
|
+
VERSION_FIELD_NUMBER: _ClassVar[int]
|
|
37
38
|
node_id: int
|
|
38
39
|
labels: _containers.RepeatedScalarFieldContainer[str]
|
|
39
40
|
properties: _containers.MessageMap[str, _types_pb2.PropertyValue]
|
|
40
41
|
element_id: str
|
|
41
|
-
|
|
42
|
+
version: int
|
|
43
|
+
def __init__(self, node_id: _Optional[int] = ..., labels: _Optional[_Iterable[str]] = ..., properties: _Optional[_Mapping[str, _types_pb2.PropertyValue]] = ..., element_id: _Optional[str] = ..., version: _Optional[int] = ...) -> None: ...
|
|
42
44
|
|
|
43
45
|
class Edge(_message.Message):
|
|
44
46
|
__slots__ = ("edge_id", "edge_type", "source_node_id", "target_node_id", "properties", "element_id")
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# NO CHECKED-IN PROTOBUF GENCODE
|
|
4
|
+
# source: coordinode/v1/query/cypher.proto
|
|
5
|
+
# Protobuf Python Version: 7.35.1
|
|
6
|
+
"""Generated protocol buffer code."""
|
|
7
|
+
from google.protobuf import descriptor as _descriptor
|
|
8
|
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
9
|
+
from google.protobuf import runtime_version as _runtime_version
|
|
10
|
+
from google.protobuf import symbol_database as _symbol_database
|
|
11
|
+
from google.protobuf.internal import builder as _builder
|
|
12
|
+
_runtime_version.ValidateProtobufRuntimeVersion(
|
|
13
|
+
_runtime_version.Domain.PUBLIC,
|
|
14
|
+
7,
|
|
15
|
+
35,
|
|
16
|
+
1,
|
|
17
|
+
'',
|
|
18
|
+
'coordinode/v1/query/cypher.proto'
|
|
19
|
+
)
|
|
20
|
+
# @@protoc_insertion_point(imports)
|
|
21
|
+
|
|
22
|
+
_sym_db = _symbol_database.Default()
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
from coordinode._proto.coordinode.v1.common import types_pb2 as coordinode_dot_v1_dot_common_dot_types__pb2
|
|
26
|
+
from coordinode._proto.coordinode.v1.replication import consistency_pb2 as coordinode_dot_v1_dot_replication_dot_consistency__pb2
|
|
27
|
+
from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n coordinode/v1/query/cypher.proto\x12\x13\x63oordinode.v1.query\x1a coordinode/v1/common/types.proto\x1a+coordinode/v1/replication/consistency.proto\x1a\x1cgoogle/api/annotations.proto\"\xac\x04\n\x14\x45xecuteCypherRequest\x12\r\n\x05query\x18\x01 \x01(\t\x12M\n\nparameters\x18\x02 \x03(\x0b\x32\x39.coordinode.v1.query.ExecuteCypherRequest.ParametersEntry\x12\x42\n\x0fread_preference\x18\x03 \x01(\x0e\x32).coordinode.v1.replication.ReadPreference\x12<\n\x0cread_concern\x18\x04 \x01(\x0b\x32&.coordinode.v1.replication.ReadConcern\x12>\n\rwrite_concern\x18\x05 \x01(\x0b\x32\'.coordinode.v1.replication.WriteConcern\x12\x16\n\x0etransaction_id\x18\x06 \x01(\x04\x12H\n\x12vector_consistency\x18\x07 \x01(\x0e\x32,.coordinode.v1.replication.VectorConsistency\x12!\n\x14vector_build_wait_ms\x18\x08 \x01(\rH\x00\x88\x01\x01\x1aV\n\x0fParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x32\n\x05value\x18\x02 \x01(\x0b\x32#.coordinode.v1.common.PropertyValue:\x02\x38\x01\x42\x17\n\x15_vector_build_wait_ms\"\x80\x01\n\x15\x45xecuteCypherResponse\x12\x0f\n\x07\x63olumns\x18\x01 \x03(\t\x12&\n\x04rows\x18\x02 \x03(\x0b\x32\x18.coordinode.v1.query.Row\x12.\n\x05stats\x18\x03 \x01(\x0b\x32\x1f.coordinode.v1.query.QueryStats\":\n\x03Row\x12\x33\n\x06values\x18\x01 \x03(\x0b\x32#.coordinode.v1.common.PropertyValue\"\xf6\x01\n\nQueryStats\x12\x15\n\rnodes_created\x18\x01 \x01(\x03\x12\x15\n\rnodes_deleted\x18\x02 \x01(\x03\x12\x15\n\redges_created\x18\x03 \x01(\x03\x12\x15\n\redges_deleted\x18\x04 \x01(\x03\x12\x16\n\x0eproperties_set\x18\x05 \x01(\x03\x12\x19\n\x11\x65xecution_time_ms\x18\x06 \x01(\x03\x12\x15\n\rapplied_index\x18\x07 \x01(\x04\x12\x18\n\x10served_by_leader\x18\x08 \x01(\x08\x12\x11\n\tcommit_ts\x18\t \x01(\x04\x12\x15\n\rread_as_of_ts\x18\n \x01(\x04\"\xcc\x01\n\x14\x45xplainCypherRequest\x12\r\n\x05query\x18\x01 \x01(\t\x12M\n\nparameters\x18\x02 \x03(\x0b\x32\x39.coordinode.v1.query.ExplainCypherRequest.ParametersEntry\x1aV\n\x0fParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x32\n\x05value\x18\x02 \x01(\x0b\x32#.coordinode.v1.common.PropertyValue:\x02\x38\x01\"E\n\x15\x45xplainCypherResponse\x12,\n\x04plan\x18\x01 \x01(\x0b\x32\x1e.coordinode.v1.query.QueryPlan\"\xd5\x01\n\tQueryPlan\x12\x10\n\x08operator\x18\x01 \x01(\t\x12<\n\x07\x64\x65tails\x18\x02 \x03(\x0b\x32+.coordinode.v1.query.QueryPlan.DetailsEntry\x12\x30\n\x08\x63hildren\x18\x03 \x03(\x0b\x32\x1e.coordinode.v1.query.QueryPlan\x12\x16\n\x0e\x65stimated_rows\x18\x04 \x01(\x01\x1a.\n\x0c\x44\x65tailsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x19\n\x17\x42\x65ginTransactionRequest\"2\n\x18\x42\x65ginTransactionResponse\x12\x16\n\x0etransaction_id\x18\x01 \x01(\x04\"l\n\x18\x43ommitTransactionRequest\x12\x16\n\x0etransaction_id\x18\x01 \x01(\x04\x12\x38\n\x06\x65xpect\x18\x02 \x03(\x0b\x32(.coordinode.v1.query.ExpectedNodeVersion\"H\n\x13\x45xpectedNodeVersion\x12\x0f\n\x07node_id\x18\x01 \x01(\x04\x12\x14\n\x07version\x18\x02 \x01(\x04H\x00\x88\x01\x01\x42\n\n\x08_version\"E\n\x19\x43ommitTransactionResponse\x12\x15\n\rapplied_index\x18\x01 \x01(\x04\x12\x11\n\tcommit_ts\x18\x02 \x01(\x04\"4\n\x1aRollbackTransactionRequest\x12\x16\n\x0etransaction_id\x18\x01 \x01(\x04\"\x1d\n\x1bRollbackTransactionResponse2\x81\x06\n\rCypherService\x12\x83\x01\n\rExecuteCypher\x12).coordinode.v1.query.ExecuteCypherRequest\x1a*.coordinode.v1.query.ExecuteCypherResponse\"\x1b\x82\xd3\xe4\x93\x02\x15\"\x10/v1/query/cypher:\x01*\x12\x8b\x01\n\rExplainCypher\x12).coordinode.v1.query.ExplainCypherRequest\x1a*.coordinode.v1.query.ExplainCypherResponse\"#\x82\xd3\xe4\x93\x02\x1d\"\x18/v1/query/cypher/explain:\x01*\x12\x97\x01\n\x10\x42\x65ginTransaction\x12,.coordinode.v1.query.BeginTransactionRequest\x1a-.coordinode.v1.query.BeginTransactionResponse\"&\x82\xd3\xe4\x93\x02 \"\x1b/v1/query/transaction/begin:\x01*\x12\x9b\x01\n\x11\x43ommitTransaction\x12-.coordinode.v1.query.CommitTransactionRequest\x1a..coordinode.v1.query.CommitTransactionResponse\"\'\x82\xd3\xe4\x93\x02!\"\x1c/v1/query/transaction/commit:\x01*\x12\xa3\x01\n\x13RollbackTransaction\x12/.coordinode.v1.query.RollbackTransactionRequest\x1a\x30.coordinode.v1.query.RollbackTransactionResponse\")\x82\xd3\xe4\x93\x02#\"\x1e/v1/query/transaction/rollback:\x01*b\x06proto3')
|
|
31
|
+
|
|
32
|
+
_globals = globals()
|
|
33
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
34
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'coordinode.v1.query.cypher_pb2', _globals)
|
|
35
|
+
if not _descriptor._USE_C_DESCRIPTORS:
|
|
36
|
+
DESCRIPTOR._loaded_options = None
|
|
37
|
+
_globals['_EXECUTECYPHERREQUEST_PARAMETERSENTRY']._loaded_options = None
|
|
38
|
+
_globals['_EXECUTECYPHERREQUEST_PARAMETERSENTRY']._serialized_options = b'8\001'
|
|
39
|
+
_globals['_EXPLAINCYPHERREQUEST_PARAMETERSENTRY']._loaded_options = None
|
|
40
|
+
_globals['_EXPLAINCYPHERREQUEST_PARAMETERSENTRY']._serialized_options = b'8\001'
|
|
41
|
+
_globals['_QUERYPLAN_DETAILSENTRY']._loaded_options = None
|
|
42
|
+
_globals['_QUERYPLAN_DETAILSENTRY']._serialized_options = b'8\001'
|
|
43
|
+
_globals['_CYPHERSERVICE'].methods_by_name['ExecuteCypher']._loaded_options = None
|
|
44
|
+
_globals['_CYPHERSERVICE'].methods_by_name['ExecuteCypher']._serialized_options = b'\202\323\344\223\002\025\"\020/v1/query/cypher:\001*'
|
|
45
|
+
_globals['_CYPHERSERVICE'].methods_by_name['ExplainCypher']._loaded_options = None
|
|
46
|
+
_globals['_CYPHERSERVICE'].methods_by_name['ExplainCypher']._serialized_options = b'\202\323\344\223\002\035\"\030/v1/query/cypher/explain:\001*'
|
|
47
|
+
_globals['_CYPHERSERVICE'].methods_by_name['BeginTransaction']._loaded_options = None
|
|
48
|
+
_globals['_CYPHERSERVICE'].methods_by_name['BeginTransaction']._serialized_options = b'\202\323\344\223\002 \"\033/v1/query/transaction/begin:\001*'
|
|
49
|
+
_globals['_CYPHERSERVICE'].methods_by_name['CommitTransaction']._loaded_options = None
|
|
50
|
+
_globals['_CYPHERSERVICE'].methods_by_name['CommitTransaction']._serialized_options = b'\202\323\344\223\002!\"\034/v1/query/transaction/commit:\001*'
|
|
51
|
+
_globals['_CYPHERSERVICE'].methods_by_name['RollbackTransaction']._loaded_options = None
|
|
52
|
+
_globals['_CYPHERSERVICE'].methods_by_name['RollbackTransaction']._serialized_options = b'\202\323\344\223\002#\"\036/v1/query/transaction/rollback:\001*'
|
|
53
|
+
_globals['_EXECUTECYPHERREQUEST']._serialized_start=167
|
|
54
|
+
_globals['_EXECUTECYPHERREQUEST']._serialized_end=723
|
|
55
|
+
_globals['_EXECUTECYPHERREQUEST_PARAMETERSENTRY']._serialized_start=612
|
|
56
|
+
_globals['_EXECUTECYPHERREQUEST_PARAMETERSENTRY']._serialized_end=698
|
|
57
|
+
_globals['_EXECUTECYPHERRESPONSE']._serialized_start=726
|
|
58
|
+
_globals['_EXECUTECYPHERRESPONSE']._serialized_end=854
|
|
59
|
+
_globals['_ROW']._serialized_start=856
|
|
60
|
+
_globals['_ROW']._serialized_end=914
|
|
61
|
+
_globals['_QUERYSTATS']._serialized_start=917
|
|
62
|
+
_globals['_QUERYSTATS']._serialized_end=1163
|
|
63
|
+
_globals['_EXPLAINCYPHERREQUEST']._serialized_start=1166
|
|
64
|
+
_globals['_EXPLAINCYPHERREQUEST']._serialized_end=1370
|
|
65
|
+
_globals['_EXPLAINCYPHERREQUEST_PARAMETERSENTRY']._serialized_start=612
|
|
66
|
+
_globals['_EXPLAINCYPHERREQUEST_PARAMETERSENTRY']._serialized_end=698
|
|
67
|
+
_globals['_EXPLAINCYPHERRESPONSE']._serialized_start=1372
|
|
68
|
+
_globals['_EXPLAINCYPHERRESPONSE']._serialized_end=1441
|
|
69
|
+
_globals['_QUERYPLAN']._serialized_start=1444
|
|
70
|
+
_globals['_QUERYPLAN']._serialized_end=1657
|
|
71
|
+
_globals['_QUERYPLAN_DETAILSENTRY']._serialized_start=1611
|
|
72
|
+
_globals['_QUERYPLAN_DETAILSENTRY']._serialized_end=1657
|
|
73
|
+
_globals['_BEGINTRANSACTIONREQUEST']._serialized_start=1659
|
|
74
|
+
_globals['_BEGINTRANSACTIONREQUEST']._serialized_end=1684
|
|
75
|
+
_globals['_BEGINTRANSACTIONRESPONSE']._serialized_start=1686
|
|
76
|
+
_globals['_BEGINTRANSACTIONRESPONSE']._serialized_end=1736
|
|
77
|
+
_globals['_COMMITTRANSACTIONREQUEST']._serialized_start=1738
|
|
78
|
+
_globals['_COMMITTRANSACTIONREQUEST']._serialized_end=1846
|
|
79
|
+
_globals['_EXPECTEDNODEVERSION']._serialized_start=1848
|
|
80
|
+
_globals['_EXPECTEDNODEVERSION']._serialized_end=1920
|
|
81
|
+
_globals['_COMMITTRANSACTIONRESPONSE']._serialized_start=1922
|
|
82
|
+
_globals['_COMMITTRANSACTIONRESPONSE']._serialized_end=1991
|
|
83
|
+
_globals['_ROLLBACKTRANSACTIONREQUEST']._serialized_start=1993
|
|
84
|
+
_globals['_ROLLBACKTRANSACTIONREQUEST']._serialized_end=2045
|
|
85
|
+
_globals['_ROLLBACKTRANSACTIONRESPONSE']._serialized_start=2047
|
|
86
|
+
_globals['_ROLLBACKTRANSACTIONRESPONSE']._serialized_end=2076
|
|
87
|
+
_globals['_CYPHERSERVICE']._serialized_start=2079
|
|
88
|
+
_globals['_CYPHERSERVICE']._serialized_end=2848
|
|
89
|
+
# @@protoc_insertion_point(module_scope)
|