Skip to content

Commit d093bd9

Browse files
authored
Re-style .proto files (#7475)
* proto: doc comment style * proto: clang-format * proto: manually reflow some comments * proto: proofread
1 parent 709a3b9 commit d093bd9

15 files changed

Lines changed: 2297 additions & 1515 deletions

lib/api/src/grpc/proto/collections.proto

Lines changed: 561 additions & 341 deletions
Large diffs are not rendered by default.

lib/api/src/grpc/proto/collections_internal_service.proto

Lines changed: 41 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,21 @@ package qdrant;
66
option csharp_namespace = "Qdrant.Client.Grpc";
77

88
service CollectionsInternal {
9-
/*
10-
Get collection info
11-
*/
12-
rpc Get (GetCollectionInfoRequestInternal) returns (GetCollectionInfoResponse) {}
13-
/*
14-
Initiate shard transfer
15-
*/
16-
rpc Initiate (InitiateShardTransferRequest) returns (CollectionOperationResponse) {}
17-
/**
18-
Wait for a shard to get into the given state
19-
*/
20-
rpc WaitForShardState (WaitForShardStateRequest) returns (CollectionOperationResponse) {}
21-
/*
22-
Get shard recovery point
23-
*/
24-
rpc GetShardRecoveryPoint (GetShardRecoveryPointRequest) returns (GetShardRecoveryPointResponse) {}
25-
/*
26-
Update shard cutoff point
27-
*/
28-
rpc UpdateShardCutoffPoint (UpdateShardCutoffPointRequest) returns (CollectionOperationResponse) {}
9+
// Get collection info
10+
rpc Get(GetCollectionInfoRequestInternal)
11+
returns (GetCollectionInfoResponse) {}
12+
// Initiate shard transfer
13+
rpc Initiate(InitiateShardTransferRequest)
14+
returns (CollectionOperationResponse) {}
15+
// Wait for a shard to get into the given state
16+
rpc WaitForShardState(WaitForShardStateRequest)
17+
returns (CollectionOperationResponse) {}
18+
// Get shard recovery point
19+
rpc GetShardRecoveryPoint(GetShardRecoveryPointRequest)
20+
returns (GetShardRecoveryPointResponse) {}
21+
// Update shard cutoff point
22+
rpc UpdateShardCutoffPoint(UpdateShardCutoffPointRequest)
23+
returns (CollectionOperationResponse) {}
2924
}
3025

3126
message GetCollectionInfoRequestInternal {
@@ -34,25 +29,35 @@ message GetCollectionInfoRequestInternal {
3429
}
3530

3631
message InitiateShardTransferRequest {
37-
string collection_name = 1; // Name of the collection
38-
uint32 shard_id = 2; // Id of the temporary shard
32+
// Name of the collection
33+
string collection_name = 1;
34+
// Id of the temporary shard
35+
uint32 shard_id = 2;
3936
}
4037

4138
message WaitForShardStateRequest {
42-
string collection_name = 1; // Name of the collection
43-
uint32 shard_id = 2; // Id of the shard
44-
ReplicaState state = 3; // Shard state to wait for
45-
uint64 timeout = 4; // Timeout in seconds
39+
// Name of the collection
40+
string collection_name = 1;
41+
// Id of the shard
42+
uint32 shard_id = 2;
43+
// Shard state to wait for
44+
ReplicaState state = 3;
45+
// Timeout in seconds
46+
uint64 timeout = 4;
4647
}
4748

4849
message GetShardRecoveryPointRequest {
49-
string collection_name = 1; // Name of the collection
50-
uint32 shard_id = 2; // Id of the shard
50+
// Name of the collection
51+
string collection_name = 1;
52+
// Id of the shard
53+
uint32 shard_id = 2;
5154
}
5255

5356
message GetShardRecoveryPointResponse {
54-
RecoveryPoint recovery_point = 1; // Recovery point of the shard
55-
double time = 2; // Time spent to process
57+
// Recovery point of the shard
58+
RecoveryPoint recovery_point = 1;
59+
// Time spent to process
60+
double time = 2;
5661
}
5762

5863
message RecoveryPoint {
@@ -67,7 +72,10 @@ message RecoveryPointClockTag {
6772
}
6873

6974
message UpdateShardCutoffPointRequest {
70-
string collection_name = 1; // Name of the collection
71-
uint32 shard_id = 2; // Id of the shard
72-
RecoveryPoint cutoff = 3; // Cutoff point of the shard
75+
// Name of the collection
76+
string collection_name = 1;
77+
// Id of the shard
78+
uint32 shard_id = 2;
79+
// Cutoff point of the shard
80+
RecoveryPoint cutoff = 3;
7381
}

lib/api/src/grpc/proto/collections_service.proto

Lines changed: 32 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -6,60 +6,36 @@ package qdrant;
66
option csharp_namespace = "Qdrant.Client.Grpc";
77

88
service Collections {
9-
/*
10-
Get detailed information about specified existing collection
11-
*/
12-
rpc Get (GetCollectionInfoRequest) returns (GetCollectionInfoResponse) {}
13-
/*
14-
Get list name of all existing collections
15-
*/
16-
rpc List (ListCollectionsRequest) returns (ListCollectionsResponse) {}
17-
/*
18-
Create new collection with given parameters
19-
*/
20-
rpc Create (CreateCollection) returns (CollectionOperationResponse) {}
21-
/*
22-
Update parameters of the existing collection
23-
*/
24-
rpc Update (UpdateCollection) returns (CollectionOperationResponse) {}
25-
/*
26-
Drop collection and all associated data
27-
*/
28-
rpc Delete (DeleteCollection) returns (CollectionOperationResponse) {}
29-
/*
30-
Update Aliases of the existing collection
31-
*/
32-
rpc UpdateAliases (ChangeAliases) returns (CollectionOperationResponse) {}
33-
/*
34-
Get list of all aliases for a collection
35-
*/
36-
rpc ListCollectionAliases (ListCollectionAliasesRequest) returns (ListAliasesResponse) {}
37-
/*
38-
Get list of all aliases for all existing collections
39-
*/
40-
rpc ListAliases (ListAliasesRequest) returns (ListAliasesResponse) {}
41-
/*
42-
Get cluster information for a collection
43-
*/
44-
rpc CollectionClusterInfo (CollectionClusterInfoRequest) returns (CollectionClusterInfoResponse) {}
45-
/*
46-
Check the existence of a collection
47-
*/
48-
rpc CollectionExists (CollectionExistsRequest) returns (CollectionExistsResponse) {}
49-
/*
50-
Update cluster setup for a collection
51-
*/
52-
rpc UpdateCollectionClusterSetup (UpdateCollectionClusterSetupRequest) returns (UpdateCollectionClusterSetupResponse) {}
53-
/*
54-
Create shard key
55-
*/
56-
rpc CreateShardKey (CreateShardKeyRequest) returns (CreateShardKeyResponse) {}
57-
/*
58-
Delete shard key
59-
*/
60-
rpc DeleteShardKey (DeleteShardKeyRequest) returns (DeleteShardKeyResponse) {}
61-
/*
62-
List shard keys
63-
*/
64-
rpc ListShardKeys (ListShardKeysRequest) returns (ListShardKeysResponse) {}
9+
// Get detailed information about specified existing collection
10+
rpc Get(GetCollectionInfoRequest) returns (GetCollectionInfoResponse) {}
11+
// Get list of names of all existing collections
12+
rpc List(ListCollectionsRequest) returns (ListCollectionsResponse) {}
13+
// Create new collection with given parameters
14+
rpc Create(CreateCollection) returns (CollectionOperationResponse) {}
15+
// Update parameters of the existing collection
16+
rpc Update(UpdateCollection) returns (CollectionOperationResponse) {}
17+
// Drop collection and all associated data
18+
rpc Delete(DeleteCollection) returns (CollectionOperationResponse) {}
19+
// Update Aliases of the existing collection
20+
rpc UpdateAliases(ChangeAliases) returns (CollectionOperationResponse) {}
21+
// Get list of all aliases for a collection
22+
rpc ListCollectionAliases(ListCollectionAliasesRequest)
23+
returns (ListAliasesResponse) {}
24+
// Get list of all aliases for all existing collections
25+
rpc ListAliases(ListAliasesRequest) returns (ListAliasesResponse) {}
26+
// Get cluster information for a collection
27+
rpc CollectionClusterInfo(CollectionClusterInfoRequest)
28+
returns (CollectionClusterInfoResponse) {}
29+
// Check the existence of a collection
30+
rpc CollectionExists(CollectionExistsRequest)
31+
returns (CollectionExistsResponse) {}
32+
// Update cluster setup for a collection
33+
rpc UpdateCollectionClusterSetup(UpdateCollectionClusterSetupRequest)
34+
returns (UpdateCollectionClusterSetupResponse) {}
35+
// Create shard key
36+
rpc CreateShardKey(CreateShardKeyRequest) returns (CreateShardKeyResponse) {}
37+
// Delete shard key
38+
rpc DeleteShardKey(DeleteShardKeyRequest) returns (DeleteShardKeyResponse) {}
39+
// List shard keys
40+
rpc ListShardKeys(ListShardKeysRequest) returns (ListShardKeysResponse) {}
6541
}

lib/api/src/grpc/proto/health_check.proto

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,12 @@ message HealthCheckResponse {
1313
UNKNOWN = 0;
1414
SERVING = 1;
1515
NOT_SERVING = 2;
16-
SERVICE_UNKNOWN = 3; // Used only by the Watch method.
16+
// Used only by the Watch method.
17+
SERVICE_UNKNOWN = 3;
1718
}
1819
ServingStatus status = 1;
1920
}
2021

2122
service Health {
2223
rpc Check(HealthCheckRequest) returns (HealthCheckResponse);
23-
}
24+
}

0 commit comments

Comments
 (0)