Skip to content

Commit

Permalink
Add feder proto (#117)
Browse files Browse the repository at this point in the history
Signed-off-by: cai.zhang <[email protected]>
  • Loading branch information
xiaocai2333 authored Mar 20, 2023
1 parent 9d21a35 commit c0751b0
Show file tree
Hide file tree
Showing 8 changed files with 1,245 additions and 714 deletions.
576 changes: 292 additions & 284 deletions go-api/commonpb/common.pb.go

Large diffs are not rendered by default.

382 changes: 382 additions & 0 deletions go-api/federpb/feder.pb.go

Large diffs are not rendered by default.

938 changes: 515 additions & 423 deletions go-api/milvuspb/milvus.pb.go

Large diffs are not rendered by default.

10 changes: 3 additions & 7 deletions go-api/schemapb/schema.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions proto/common.proto
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,8 @@ enum MsgType {
HandoffSegments = 254;
LoadBalanceSegments = 255;
DescribeSegments = 256;
FederListIndexedSegment = 257;
FederDescribeSegmentIndexData = 258;

/* DEFINITION REQUESTS: INDEX */
CreateIndex = 300;
Expand Down
40 changes: 40 additions & 0 deletions proto/feder.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
syntax = "proto3";
package milvus.proto.feder;
option go_package = "github.com/milvus-io/milvus-proto/go-api/federpb";

import "common.proto";

message SegmentIndexData {
int64 segmentID = 1;
string index_data = 2; // data from knownwhere
}

message FederSegmentSearchResult {
int64 segmentID = 1;
string visit_info = 2;
}

message ListIndexedSegmentRequest {
common.MsgBase base = 1;
string collection_name = 2;
string index_name = 3;
}

message ListIndexedSegmentResponse {
common.Status status = 1;
repeated int64 segmentIDs = 2;
}

message DescribeSegmentIndexDataRequest {
common.MsgBase base = 1;
string collection_name = 2;
string index_name = 3;
repeated int64 segmentsIDs = 4;
}

message DescribeSegmentIndexDataResponse {
common.Status status = 1;
// segmentID => segmentIndexData
map<int64, feder.SegmentIndexData> index_data = 2;
repeated common.KeyValuePair index_params = 3;
}
4 changes: 4 additions & 0 deletions proto/milvus.proto
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ option csharp_namespace = "IO.Milvus.Grpc";

import "common.proto";
import "schema.proto";
import "feder.proto";
import "google/protobuf/descriptor.proto";

service MilvusService {
Expand Down Expand Up @@ -108,6 +109,9 @@ service MilvusService {
rpc DescribeResourceGroup(DescribeResourceGroupRequest) returns (DescribeResourceGroupResponse) {}

rpc RenameCollection(RenameCollectionRequest) returns (common.Status) {}

rpc ListIndexedSegment(feder.ListIndexedSegmentRequest) returns(feder.ListIndexedSegmentResponse) {}
rpc DescribeSegmentIndexData(feder.DescribeSegmentIndexDataRequest) returns(feder.DescribeSegmentIndexDataResponse) {}
}

message CreateAliasRequest {
Expand Down
7 changes: 7 additions & 0 deletions scripts/proto_gen_go.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ mkdir -p ../go-api/commonpb
mkdir -p ../go-api/schemapb
mkdir -p ../go-api/milvuspb
mkdir -p ../go-api/msgpb
mkdir -p ../go-api/federpb

$protoc --version

Expand Down Expand Up @@ -66,4 +67,10 @@ $protoc --proto_path="${GOOGLE_PROTO_DIR}" --proto_path=. \
--go_opt="Mmessage.proto=github.com/milvus-io/milvus-proto/go-api/msgapb;msgpb" \
--go_out=plugins=grpc,paths=source_relative:./../go-api/msgpb msg.proto

$protoc --proto_path="${GOOGLE_PROTO_DIR}" --proto_path=. \
--go_opt=Mschema.proto=github.com/milvus-io/milvus-proto/go-api/schemapb \
--go_opt=Mcommon.proto=github.com/milvus-io/milvus-proto/go-api/commonpb \
--go_opt="Mmessage.proto=github.com/milvus-io/milvus-proto/go-api/federpb;federpb" \
--go_out=plugins=grpc,paths=source_relative:./../go-api/federpb feder.proto

popd

0 comments on commit c0751b0

Please sign in to comment.