diff --git a/Makefile b/Makefile index 6a19d057f5..9d326895fa 100644 --- a/Makefile +++ b/Makefile @@ -67,6 +67,7 @@ REVIEWDOG_VERSION := $(eval REVIEWDOG_VERSION := $(shell cat versions/RE TELEPRESENCE_VERSION := $(eval TELEPRESENCE_VERSION := $(shell cat versions/TELEPRESENCE_VERSION))$(TELEPRESENCE_VERSION) VALDCLI_VERSION := $(eval VALDCLI_VERSION := $(shell cat versions/VALDCLI_VERSION))$(VALDCLI_VERSION) YQ_VERSION := $(eval YQ_VERSION := $(shell cat versions/YQ_VERSION))$(YQ_VERSION) +BUF_VERSION := $(eval BUF_VERSION := $(shell cat versions/BUF_VERSION))$(BUF_VERSION) OTEL_OPERATOR_RELEASE_NAME ?= opentelemetry-operator PROMETHEUS_RELEASE_NAME ?= prometheus @@ -396,7 +397,8 @@ format: \ format/go \ format/json \ format/md \ - format/yaml + format/yaml \ + format/proto .PHONY: format/go ## run golines, gofumpt, goimports for all go files @@ -448,6 +450,11 @@ format/json: \ "charts/**/*.json" \ "hack/**/*.json" +.PHONY: format/proto +format/proto: \ + buf/install + buf format -w + .PHONY: deps ## resolve dependencies deps: \ diff --git a/Makefile.d/tools.mk b/Makefile.d/tools.mk index 95e59b58f5..ed71eaf1a1 100644 --- a/Makefile.d/tools.mk +++ b/Makefile.d/tools.mk @@ -83,3 +83,12 @@ textlint/install: textlint/ci/install: npm init -y npm install --save-dev textlint textlint-rule-en-spell textlint-rule-prh textlint-rule-write-good + +.PHONY: buf/install +buf/install: $(BINDIR)/buf + +$(BINDIR)/buf: + curl -sSL \ + "https://github.com/bufbuild/buf/releases/download/$(BUF_VERSION)/buf-$(shell uname -s)-$(shell uname -m)" \ + -o "${BINDIR}/buf" && \ + chmod +x "${BINDIR}/buf" diff --git a/apis/proto/v1/agent/core/agent.proto b/apis/proto/v1/agent/core/agent.proto index 59c2fcebdf..b2142e8519 100644 --- a/apis/proto/v1/agent/core/agent.proto +++ b/apis/proto/v1/agent/core/agent.proto @@ -23,15 +23,13 @@ import "github.com/googleapis/googleapis/google/api/annotations.proto"; option go_package = "github.com/vdaas/vald/apis/grpc/v1/agent/core"; option java_multiple_files = true; -option java_package = "org.vdaas.vald.api.v1.agent.core"; option java_outer_classname = "ValdAgent"; +option java_package = "org.vdaas.vald.api.v1.agent.core"; // Represent the agent service. service Agent { - // Represent the creating index RPC. - rpc CreateIndex(payload.v1.Control.CreateIndexRequest) - returns (payload.v1.Empty) { + rpc CreateIndex(payload.v1.Control.CreateIndexRequest) returns (payload.v1.Empty) { option (google.api.http).get = "/index/create"; } @@ -41,8 +39,7 @@ service Agent { } // Represent the creating and saving index RPC. - rpc CreateAndSaveIndex(payload.v1.Control.CreateIndexRequest) - returns (payload.v1.Empty) { + rpc CreateAndSaveIndex(payload.v1.Control.CreateIndexRequest) returns (payload.v1.Empty) { option (google.api.http).get = "/index/createandsave"; } diff --git a/apis/proto/v1/agent/sidecar/sidecar.proto b/apis/proto/v1/agent/sidecar/sidecar.proto index 40a6b6e2d6..878de7d9d6 100644 --- a/apis/proto/v1/agent/sidecar/sidecar.proto +++ b/apis/proto/v1/agent/sidecar/sidecar.proto @@ -20,8 +20,8 @@ package sidecar.v1; option go_package = "github.com/vdaas/vald/apis/grpc/v1/agent/sidecar"; option java_multiple_files = true; -option java_package = "org.vdaas.vald.api.v1.agent.sidecar"; option java_outer_classname = "ValdAgentSidecar"; +option java_package = "org.vdaas.vald.api.v1.agent.sidecar"; // Represent the agent sidecar service. service Sidecar {} diff --git a/apis/proto/v1/discoverer/discoverer.proto b/apis/proto/v1/discoverer/discoverer.proto index 62fa2ad4c7..76d9c44539 100644 --- a/apis/proto/v1/discoverer/discoverer.proto +++ b/apis/proto/v1/discoverer/discoverer.proto @@ -23,25 +23,24 @@ import "github.com/googleapis/googleapis/google/api/annotations.proto"; option go_package = "github.com/vdaas/vald/apis/grpc/v1/discoverer"; option java_multiple_files = true; -option java_package = "org.vdaas.vald.api.v1.discoverer"; option java_outer_classname = "ValdDiscoverer"; +option java_package = "org.vdaas.vald.api.v1.discoverer"; // Represent the discoverer service. service Discoverer { - // Represent the RPC to get the agent pods information. rpc Pods(payload.v1.Discoverer.Request) returns (payload.v1.Info.Pods) { option (google.api.http) = { - post : "/discover/pods" - body : "*" + post: "/discover/pods" + body: "*" }; } // Represent the RPC to get the node information. rpc Nodes(payload.v1.Discoverer.Request) returns (payload.v1.Info.Nodes) { option (google.api.http) = { - post : "/discover/nodes" - body : "*" + post: "/discover/nodes" + body: "*" }; } } diff --git a/apis/proto/v1/filter/egress/egress_filter.proto b/apis/proto/v1/filter/egress/egress_filter.proto index 5681ea62fb..72ab957d4c 100644 --- a/apis/proto/v1/filter/egress/egress_filter.proto +++ b/apis/proto/v1/filter/egress/egress_filter.proto @@ -23,27 +23,24 @@ import "github.com/googleapis/googleapis/google/api/annotations.proto"; option go_package = "github.com/vdaas/vald/apis/grpc/v1/filter/egress"; option java_multiple_files = true; -option java_package = "org.vdaas.vald.api.v1.filter.egress"; option java_outer_classname = "ValdEgressFilter"; +option java_package = "org.vdaas.vald.api.v1.filter.egress"; // Represent the egress filter service. service Filter { - // Represent the RPC to filter the distance. - rpc FilterDistance(payload.v1.Object.Distance) - returns (payload.v1.Object.Distance) { + rpc FilterDistance(payload.v1.Object.Distance) returns (payload.v1.Object.Distance) { option (google.api.http) = { - post : "/filter/egress/distance" - body : "*" + post: "/filter/egress/distance" + body: "*" }; } // Represent the RPC to filter the vector. - rpc FilterVector(payload.v1.Object.Vector) - returns (payload.v1.Object.Vector) { + rpc FilterVector(payload.v1.Object.Vector) returns (payload.v1.Object.Vector) { option (google.api.http) = { - post : "/filter/egress/vector" - body : "*" + post: "/filter/egress/vector" + body: "*" }; } } diff --git a/apis/proto/v1/filter/ingress/ingress_filter.proto b/apis/proto/v1/filter/ingress/ingress_filter.proto index 871ed1bcff..07fb381f22 100644 --- a/apis/proto/v1/filter/ingress/ingress_filter.proto +++ b/apis/proto/v1/filter/ingress/ingress_filter.proto @@ -23,26 +23,24 @@ import "github.com/googleapis/googleapis/google/api/annotations.proto"; option go_package = "github.com/vdaas/vald/apis/grpc/v1/filter/ingress"; option java_multiple_files = true; -option java_package = "org.vdaas.vald.api.v1.filter.ingress"; option java_outer_classname = "ValdIngressFilter"; +option java_package = "org.vdaas.vald.api.v1.filter.ingress"; // Represent the ingress filter service. service Filter { - // Represent the RPC to generate the vector. rpc GenVector(payload.v1.Object.Blob) returns (payload.v1.Object.Vector) { option (google.api.http) = { - post : "/filter/ingress/object" - body : "*" + post: "/filter/ingress/object" + body: "*" }; } // Represent the RPC to filter the vector. - rpc FilterVector(payload.v1.Object.Vector) - returns (payload.v1.Object.Vector) { + rpc FilterVector(payload.v1.Object.Vector) returns (payload.v1.Object.Vector) { option (google.api.http) = { - post : "/filter/ingress/vector" - body : "*" + post: "/filter/ingress/vector" + body: "*" }; } } diff --git a/apis/proto/v1/manager/index/index_manager.proto b/apis/proto/v1/manager/index/index_manager.proto index cc33bd0ca3..40a1679d6b 100644 --- a/apis/proto/v1/manager/index/index_manager.proto +++ b/apis/proto/v1/manager/index/index_manager.proto @@ -23,12 +23,11 @@ import "github.com/googleapis/googleapis/google/api/annotations.proto"; option go_package = "github.com/vdaas/vald/apis/grpc/v1/manager/index"; option java_multiple_files = true; -option java_package = "org.vdaas.vald.api.v1.manager.index"; option java_outer_classname = "ValdIndexManager"; +option java_package = "org.vdaas.vald.api.v1.manager.index"; // Represent the index manager service. service Index { - // Represent the RPC to get the index information. rpc IndexInfo(payload.v1.Empty) returns (payload.v1.Info.Index.Count) { option (google.api.http).get = "/index/info"; diff --git a/apis/proto/v1/payload/payload.proto b/apis/proto/v1/payload/payload.proto index a23954ba1d..d2b9bd2285 100644 --- a/apis/proto/v1/payload/payload.proto +++ b/apis/proto/v1/payload/payload.proto @@ -23,15 +23,15 @@ import "github.com/googleapis/googleapis/google/rpc/status.proto"; option go_package = "github.com/vdaas/vald/apis/grpc/v1/payload"; option java_multiple_files = true; -option java_package = "org.vdaas.vald.api.v1.payload"; option java_outer_classname = "ValdPayload"; +option java_package = "org.vdaas.vald.api.v1.payload"; // Search related messages. message Search { // Represent a search request. message Request { // The vector to be searched. - repeated float vector = 1 [ (validate.rules).repeated .min_items = 2 ]; + repeated float vector = 1 [(validate.rules).repeated.min_items = 2]; // The configuration of the search request. Config config = 2; } @@ -77,7 +77,7 @@ message Search { // Unique request ID. string request_id = 1; // Maximum number of result to be returned. - uint32 num = 2 [ (validate.rules).uint32.gte = 1 ]; + uint32 num = 2 [(validate.rules).uint32.gte = 1]; // Search radius. float radius = 3; // Search coefficient. @@ -89,7 +89,7 @@ message Search { // Egress filter configurations. Filter.Config egress_filters = 7; // Minimum number of result to be returned. - uint32 min_num = 8 [ (validate.rules).uint32.gte = 0 ]; + uint32 min_num = 8 [(validate.rules).uint32.gte = 0]; // Aggregation Algorithm AggregationAlgorithm aggregation_algorithm = 9; } @@ -147,11 +147,10 @@ message Filter { // Insert related messages. message Insert { - // Represent the insert request. message Request { // The vector to be inserted. - Object.Vector vector = 1 [ (validate.rules).repeated .min_items = 2 ]; + Object.Vector vector = 1 [(validate.rules).repeated.min_items = 2]; // The configuration of the insert request. Config config = 2; } @@ -194,7 +193,7 @@ message Update { // Represent the update request. message Request { // The vector to be updated. - Object.Vector vector = 1 [ (validate.rules).repeated .min_items = 2 ]; + Object.Vector vector = 1 [(validate.rules).repeated.min_items = 2]; // The configuration of the update request. Config config = 2; } @@ -237,11 +236,10 @@ message Update { // Upsert related messages. message Upsert { - // Represent the upsert request. message Request { // The vector to be upserted. - Object.Vector vector = 1 [ (validate.rules).repeated .min_items = 2 ]; + Object.Vector vector = 1 [(validate.rules).repeated.min_items = 2]; // The configuration of the upsert request. Config config = 2; } @@ -284,7 +282,6 @@ message Upsert { // Remove related messages. message Remove { - // Represent the remove request. message Request { // The object ID to be removed. @@ -310,11 +307,10 @@ message Remove { // Common messages. message Object { - // Represent a request to fetch raw vector. message VectorRequest { // The vector ID to be fetched. - ID id = 1 [ (validate.rules).repeated .min_items = 2 ]; + ID id = 1 [(validate.rules).repeated.min_items = 2]; // Filter configurations. Filter.Config filters = 2; } @@ -338,21 +334,27 @@ message Object { } // Represent the vector ID. - message ID { string id = 1 [ (validate.rules).string.min_len = 1 ]; } + message ID { + string id = 1 [(validate.rules).string.min_len = 1]; + } // Represent multiple vector IDs. - message IDs { repeated string ids = 1; } + message IDs { + repeated string ids = 1; + } // Represent a vector. message Vector { // The vector ID. - string id = 1 [ (validate.rules).string.min_len = 1 ]; + string id = 1 [(validate.rules).string.min_len = 1]; // The vector. - repeated float vector = 2 [ (validate.rules).repeated .min_items = 2 ]; + repeated float vector = 2 [(validate.rules).repeated.min_items = 2]; } // Represent multiple vectors. - message Vectors { repeated Vector vectors = 1; } + message Vectors { + repeated Vector vectors = 1; + } // Represent stream response of the vector. message StreamVector { @@ -375,7 +377,7 @@ message Object { // Represent the binary object. message Blob { // The object ID. - string id = 1 [ (validate.rules).string.min_len = 1 ]; + string id = 1 [(validate.rules).string.min_len = 1]; // The binary object. bytes object = 2; } @@ -411,7 +413,9 @@ message Object { } // Represent multiple vector locations. - message Locations { repeated Location locations = 1; } + message Locations { + repeated Location locations = 1; + } } // Control related messages. @@ -419,17 +423,16 @@ message Control { // Represent the create index request. message CreateIndexRequest { // The pool size of the create index operation. - uint32 pool_size = 1 [ (validate.rules).uint32.gte = 0 ]; + uint32 pool_size = 1 [(validate.rules).uint32.gte = 0]; } } // Discoverer related messages. message Discoverer { - // Represent the dicoverer request. message Request { // The agent name to be discovered. - string name = 1 [ (validate.rules).string.min_len = 1 ]; + string name = 1 [(validate.rules).string.min_len = 1]; // The namespace to be discovered. string namespace = 2; // The node to be discovered. @@ -439,10 +442,8 @@ message Discoverer { // Info related messages. message Info { - // Represent the index information messages. message Index { - // Represent the index count message. message Count { // The stored index count. @@ -458,9 +459,13 @@ message Info { // Represent the UUID message. message UUID { // The committed UUID. - message Committed { string uuid = 1; } + message Committed { + string uuid = 1; + } // The uncommitted UUID. - message Uncommitted { string uuid = 1; } + message Uncommitted { + string uuid = 1; + } } } @@ -473,7 +478,7 @@ message Info { // The namespace of the pod. string namespace = 3; // The IP of the pod. - string ip = 4 [ (validate.rules).string.ipv4 = true ]; + string ip = 4 [(validate.rules).string.ipv4 = true]; // The CPU information of the pod. CPU cpu = 5; // The memory information of the pod. @@ -521,17 +526,19 @@ message Info { // Represent the multiple pod information message. message Pods { // The multiple pod information. - repeated Pod pods = 1 [ (validate.rules).repeated .min_items = 1 ]; + repeated Pod pods = 1 [(validate.rules).repeated.min_items = 1]; } // Represent the multiple node information message. message Nodes { // The multiple node information. - repeated Node nodes = 1 [ (validate.rules).repeated .min_items = 1 ]; + repeated Node nodes = 1 [(validate.rules).repeated.min_items = 1]; } // Represent the multiple IP message. - message IPs { repeated string ip = 1; } + message IPs { + repeated string ip = 1; + } } // Represent an empty message. diff --git a/apis/proto/v1/vald/filter.proto b/apis/proto/v1/vald/filter.proto index a33f7d04ef..31ff34d9fe 100644 --- a/apis/proto/v1/vald/filter.proto +++ b/apis/proto/v1/vald/filter.proto @@ -23,97 +23,84 @@ import "github.com/googleapis/googleapis/google/api/annotations.proto"; option go_package = "github.com/vdaas/vald/apis/grpc/v1/vald"; option java_multiple_files = true; -option java_package = "org.vdaas.vald.api.v1.vald"; option java_outer_classname = "ValdFilter"; +option java_package = "org.vdaas.vald.api.v1.vald"; // Filter service provides ways to connect to Vald through filter. service Filter { - // A method to search object. - rpc SearchObject(payload.v1.Search.ObjectRequest) - returns (payload.v1.Search.Response) { + rpc SearchObject(payload.v1.Search.ObjectRequest) returns (payload.v1.Search.Response) { option (google.api.http) = { - post : "/search/object" - body : "*" + post: "/search/object" + body: "*" }; } // A method to search multiple objects. - rpc MultiSearchObject(payload.v1.Search.MultiObjectRequest) - returns (payload.v1.Search.Responses) { + rpc MultiSearchObject(payload.v1.Search.MultiObjectRequest) returns (payload.v1.Search.Responses) { option (google.api.http) = { - post : "/search/object/multiple" - body : "*" + post: "/search/object/multiple" + body: "*" }; } // A method to search object by bidirectional streaming. - rpc StreamSearchObject(stream payload.v1.Search.ObjectRequest) - returns (stream payload.v1.Search.StreamResponse) {} + rpc StreamSearchObject(stream payload.v1.Search.ObjectRequest) returns (stream payload.v1.Search.StreamResponse) {} // A method insert object. - rpc InsertObject(payload.v1.Insert.ObjectRequest) - returns (payload.v1.Object.Location) { + rpc InsertObject(payload.v1.Insert.ObjectRequest) returns (payload.v1.Object.Location) { option (google.api.http) = { - post : "/insert/object" - body : "*" + post: "/insert/object" + body: "*" }; } // Represent the streaming RPC to insert object by bidirectional streaming. - rpc StreamInsertObject(stream payload.v1.Insert.ObjectRequest) - returns (stream payload.v1.Object.StreamLocation) {} + rpc StreamInsertObject(stream payload.v1.Insert.ObjectRequest) returns (stream payload.v1.Object.StreamLocation) {} // A method to insert multiple objects. - rpc MultiInsertObject(payload.v1.Insert.MultiObjectRequest) - returns (payload.v1.Object.Locations) { + rpc MultiInsertObject(payload.v1.Insert.MultiObjectRequest) returns (payload.v1.Object.Locations) { option (google.api.http) = { - post : "/insert/object/multiple" - body : "*" + post: "/insert/object/multiple" + body: "*" }; } // A method to update object. - rpc UpdateObject(payload.v1.Update.ObjectRequest) - returns (payload.v1.Object.Location) { + rpc UpdateObject(payload.v1.Update.ObjectRequest) returns (payload.v1.Object.Location) { option (google.api.http) = { - post : "/update/object" - body : "*" + post: "/update/object" + body: "*" }; } // A method to update object by bidirectional streaming. - rpc StreamUpdateObject(stream payload.v1.Update.ObjectRequest) - returns (stream payload.v1.Object.StreamLocation) {} + rpc StreamUpdateObject(stream payload.v1.Update.ObjectRequest) returns (stream payload.v1.Object.StreamLocation) {} // A method to update multiple objects. - rpc MultiUpdateObject(payload.v1.Update.MultiObjectRequest) - returns (payload.v1.Object.Locations) { + rpc MultiUpdateObject(payload.v1.Update.MultiObjectRequest) returns (payload.v1.Object.Locations) { option (google.api.http) = { - post : "/update/object/multiple" - body : "*" + post: "/update/object/multiple" + body: "*" }; } // A method to upsert object. - rpc UpsertObject(payload.v1.Upsert.ObjectRequest) - returns (payload.v1.Object.Location) { + rpc UpsertObject(payload.v1.Upsert.ObjectRequest) returns (payload.v1.Object.Location) { option (google.api.http) = { - post : "/upsert/object" - body : "*" + post: "/upsert/object" + body: "*" }; } // A method to upsert object by bidirectional streaming. - rpc StreamUpsertObject(stream payload.v1.Upsert.ObjectRequest) - returns (stream payload.v1.Object.StreamLocation) {} + rpc StreamUpsertObject(stream payload.v1.Upsert.ObjectRequest) returns (stream payload.v1.Object.StreamLocation) {} // A method to upsert multiple objects. - rpc MultiUpsertObject(payload.v1.Upsert.MultiObjectRequest) - returns (payload.v1.Object.Locations) { + rpc MultiUpsertObject(payload.v1.Upsert.MultiObjectRequest) returns (payload.v1.Object.Locations) { option (google.api.http) = { - post : "/upsert/object/multiple" - body : "*" + post: "/upsert/object/multiple" + body: "*" }; } } diff --git a/apis/proto/v1/vald/insert.proto b/apis/proto/v1/vald/insert.proto index 19ed7096fd..1d5479456e 100644 --- a/apis/proto/v1/vald/insert.proto +++ b/apis/proto/v1/vald/insert.proto @@ -23,30 +23,27 @@ import "github.com/googleapis/googleapis/google/api/annotations.proto"; option go_package = "github.com/vdaas/vald/apis/grpc/v1/vald"; option java_multiple_files = true; -option java_package = "org.vdaas.vald.api.v1.vald"; option java_outer_classname = "ValdInsert"; +option java_package = "org.vdaas.vald.api.v1.vald"; // Insert service provides ways to add new vectors. service Insert { - // A method to add a new single vector. rpc Insert(payload.v1.Insert.Request) returns (payload.v1.Object.Location) { option (google.api.http) = { - post : "/insert" - body : "*" + post: "/insert" + body: "*" }; } // A method to add new multiple vectors by bidirectional streaming. - rpc StreamInsert(stream payload.v1.Insert.Request) - returns (stream payload.v1.Object.StreamLocation) {} + rpc StreamInsert(stream payload.v1.Insert.Request) returns (stream payload.v1.Object.StreamLocation) {} // A method to add new multiple vectors in a single request. - rpc MultiInsert(payload.v1.Insert.MultiRequest) - returns (payload.v1.Object.Locations) { + rpc MultiInsert(payload.v1.Insert.MultiRequest) returns (payload.v1.Object.Locations) { option (google.api.http) = { - post : "/insert/multiple" - body : "*" + post: "/insert/multiple" + body: "*" }; } } diff --git a/apis/proto/v1/vald/object.proto b/apis/proto/v1/vald/object.proto index ea36040b50..f275e29096 100644 --- a/apis/proto/v1/vald/object.proto +++ b/apis/proto/v1/vald/object.proto @@ -23,24 +23,21 @@ import "github.com/googleapis/googleapis/google/api/annotations.proto"; option go_package = "github.com/vdaas/vald/apis/grpc/v1/vald"; option java_multiple_files = true; -option java_package = "org.vdaas.vald.api.v1.vald"; option java_outer_classname = "ValdObject"; +option java_package = "org.vdaas.vald.api.v1.vald"; // Object service provides ways to fetch indexed vectors. service Object { - // A method to check whether a specified ID is indexed or not. rpc Exists(payload.v1.Object.ID) returns (payload.v1.Object.ID) { option (google.api.http).get = "/exists/{id}"; } // A method to fetch a vector. - rpc GetObject(payload.v1.Object.VectorRequest) - returns (payload.v1.Object.Vector) { + rpc GetObject(payload.v1.Object.VectorRequest) returns (payload.v1.Object.Vector) { option (google.api.http).get = "/object/{id.id}"; } // A method to fetch vectors by bidirectional streaming. - rpc StreamGetObject(stream payload.v1.Object.VectorRequest) - returns (stream payload.v1.Object.StreamVector) {} + rpc StreamGetObject(stream payload.v1.Object.VectorRequest) returns (stream payload.v1.Object.StreamVector) {} } diff --git a/apis/proto/v1/vald/remove.proto b/apis/proto/v1/vald/remove.proto index 8e171dae9e..aac732f81b 100644 --- a/apis/proto/v1/vald/remove.proto +++ b/apis/proto/v1/vald/remove.proto @@ -23,30 +23,27 @@ import "github.com/googleapis/googleapis/google/api/annotations.proto"; option go_package = "github.com/vdaas/vald/apis/grpc/v1/vald"; option java_multiple_files = true; -option java_package = "org.vdaas.vald.api.v1.vald"; option java_outer_classname = "ValdRemove"; +option java_package = "org.vdaas.vald.api.v1.vald"; // Remove service provides ways to remove indexed vectors. service Remove { - // A method to remove an indexed vector. rpc Remove(payload.v1.Remove.Request) returns (payload.v1.Object.Location) { option (google.api.http) = { - post : "/remove" - body : "*" + post: "/remove" + body: "*" }; } // A method to remove multiple indexed vectors by bidirectional streaming. - rpc StreamRemove(stream payload.v1.Remove.Request) - returns (stream payload.v1.Object.StreamLocation) {} + rpc StreamRemove(stream payload.v1.Remove.Request) returns (stream payload.v1.Object.StreamLocation) {} // A method to remove multiple indexed vectors in a single request. - rpc MultiRemove(payload.v1.Remove.MultiRequest) - returns (payload.v1.Object.Locations) { + rpc MultiRemove(payload.v1.Remove.MultiRequest) returns (payload.v1.Object.Locations) { option (google.api.http) = { - post : "/remove/multiple" - body : "*" + post: "/remove/multiple" + body: "*" }; } } diff --git a/apis/proto/v1/vald/search.proto b/apis/proto/v1/vald/search.proto index a5cc5a271e..ec854349c2 100644 --- a/apis/proto/v1/vald/search.proto +++ b/apis/proto/v1/vald/search.proto @@ -23,98 +23,86 @@ import "github.com/googleapis/googleapis/google/api/annotations.proto"; option go_package = "github.com/vdaas/vald/apis/grpc/v1/vald"; option java_multiple_files = true; -option java_package = "org.vdaas.vald.api.v1.vald"; option java_outer_classname = "ValdSearch"; +option java_package = "org.vdaas.vald.api.v1.vald"; // Search service provides ways to search indexed vectors. service Search { - // A method to search indexed vectors by a raw vector. rpc Search(payload.v1.Search.Request) returns (payload.v1.Search.Response) { option (google.api.http) = { - post : "/search" - body : "*" + post: "/search" + body: "*" }; } // A method to search indexed vectors by ID. - rpc SearchByID(payload.v1.Search.IDRequest) - returns (payload.v1.Search.Response) { + rpc SearchByID(payload.v1.Search.IDRequest) returns (payload.v1.Search.Response) { option (google.api.http) = { - post : "/search/id" - body : "*" + post: "/search/id" + body: "*" }; } // A method to search indexed vectors by multiple vectors. - rpc StreamSearch(stream payload.v1.Search.Request) - returns (stream payload.v1.Search.StreamResponse) {} + rpc StreamSearch(stream payload.v1.Search.Request) returns (stream payload.v1.Search.StreamResponse) {} // A method to search indexed vectors by multiple IDs. - rpc StreamSearchByID(stream payload.v1.Search.IDRequest) - returns (stream payload.v1.Search.StreamResponse) {} + rpc StreamSearchByID(stream payload.v1.Search.IDRequest) returns (stream payload.v1.Search.StreamResponse) {} // A method to search indexed vectors by multiple vectors in a single request. - rpc MultiSearch(payload.v1.Search.MultiRequest) - returns (payload.v1.Search.Responses) { + rpc MultiSearch(payload.v1.Search.MultiRequest) returns (payload.v1.Search.Responses) { option (google.api.http) = { - post : "/search/multiple" - body : "*" + post: "/search/multiple" + body: "*" }; } // A method to search indexed vectors by multiple IDs in a single request. - rpc MultiSearchByID(payload.v1.Search.MultiIDRequest) - returns (payload.v1.Search.Responses) { + rpc MultiSearchByID(payload.v1.Search.MultiIDRequest) returns (payload.v1.Search.Responses) { option (google.api.http) = { - post : "/search/id/multiple" - body : "*" + post: "/search/id/multiple" + body: "*" }; } // A method to linear search indexed vectors by a raw vector. - rpc LinearSearch(payload.v1.Search.Request) - returns (payload.v1.Search.Response) { + rpc LinearSearch(payload.v1.Search.Request) returns (payload.v1.Search.Response) { option (google.api.http) = { - post : "/linearsearch" - body : "*" + post: "/linearsearch" + body: "*" }; } // A method to linear search indexed vectors by ID. - rpc LinearSearchByID(payload.v1.Search.IDRequest) - returns (payload.v1.Search.Response) { + rpc LinearSearchByID(payload.v1.Search.IDRequest) returns (payload.v1.Search.Response) { option (google.api.http) = { - post : "/linearsearch/id" - body : "*" + post: "/linearsearch/id" + body: "*" }; } // A method to linear search indexed vectors by multiple vectors. - rpc StreamLinearSearch(stream payload.v1.Search.Request) - returns (stream payload.v1.Search.StreamResponse) {} + rpc StreamLinearSearch(stream payload.v1.Search.Request) returns (stream payload.v1.Search.StreamResponse) {} // A method to linear search indexed vectors by multiple IDs. - rpc StreamLinearSearchByID(stream payload.v1.Search.IDRequest) - returns (stream payload.v1.Search.StreamResponse) {} + rpc StreamLinearSearchByID(stream payload.v1.Search.IDRequest) returns (stream payload.v1.Search.StreamResponse) {} // A method to linear search indexed vectors by multiple vectors in a single // request. - rpc MultiLinearSearch(payload.v1.Search.MultiRequest) - returns (payload.v1.Search.Responses) { + rpc MultiLinearSearch(payload.v1.Search.MultiRequest) returns (payload.v1.Search.Responses) { option (google.api.http) = { - post : "/linearsearch/multiple" - body : "*" + post: "/linearsearch/multiple" + body: "*" }; } // A method to linear search indexed vectors by multiple IDs in a single // request. - rpc MultiLinearSearchByID(payload.v1.Search.MultiIDRequest) - returns (payload.v1.Search.Responses) { + rpc MultiLinearSearchByID(payload.v1.Search.MultiIDRequest) returns (payload.v1.Search.Responses) { option (google.api.http) = { - post : "/linearsearch/id/multiple" - body : "*" + post: "/linearsearch/id/multiple" + body: "*" }; } } diff --git a/apis/proto/v1/vald/update.proto b/apis/proto/v1/vald/update.proto index 611a91a1d9..ea0c8a2e67 100644 --- a/apis/proto/v1/vald/update.proto +++ b/apis/proto/v1/vald/update.proto @@ -23,30 +23,27 @@ import "github.com/googleapis/googleapis/google/api/annotations.proto"; option go_package = "github.com/vdaas/vald/apis/grpc/v1/vald"; option java_multiple_files = true; -option java_package = "org.vdaas.vald.api.v1.vald"; option java_outer_classname = "ValdUpdate"; +option java_package = "org.vdaas.vald.api.v1.vald"; // Update service provides ways to update indexed vectors. service Update { - // A method to update an indexed vector. rpc Update(payload.v1.Update.Request) returns (payload.v1.Object.Location) { option (google.api.http) = { - post : "/update" - body : "*" + post: "/update" + body: "*" }; } // A method to update multiple indexed vectors by bidirectional streaming. - rpc StreamUpdate(stream payload.v1.Update.Request) - returns (stream payload.v1.Object.StreamLocation) {} + rpc StreamUpdate(stream payload.v1.Update.Request) returns (stream payload.v1.Object.StreamLocation) {} // A method to update multiple indexed vectors in a single request. - rpc MultiUpdate(payload.v1.Update.MultiRequest) - returns (payload.v1.Object.Locations) { + rpc MultiUpdate(payload.v1.Update.MultiRequest) returns (payload.v1.Object.Locations) { option (google.api.http) = { - post : "/update/multiple" - body : "*" + post: "/update/multiple" + body: "*" }; } } diff --git a/apis/proto/v1/vald/upsert.proto b/apis/proto/v1/vald/upsert.proto index 3d984fd88a..abe3384ef5 100644 --- a/apis/proto/v1/vald/upsert.proto +++ b/apis/proto/v1/vald/upsert.proto @@ -23,30 +23,27 @@ import "github.com/googleapis/googleapis/google/api/annotations.proto"; option go_package = "github.com/vdaas/vald/apis/grpc/v1/vald"; option java_multiple_files = true; -option java_package = "org.vdaas.vald.api.v1.vald"; option java_outer_classname = "ValdUpsert"; +option java_package = "org.vdaas.vald.api.v1.vald"; // Upsert service provides ways to insert/update vectors. service Upsert { - // A method to insert/update a vector. rpc Upsert(payload.v1.Upsert.Request) returns (payload.v1.Object.Location) { option (google.api.http) = { - post : "/upsert" - body : "*" + post: "/upsert" + body: "*" }; } // A method to insert/update multiple vectors by bidirectional streaming. - rpc StreamUpsert(stream payload.v1.Upsert.Request) - returns (stream payload.v1.Object.StreamLocation) {} + rpc StreamUpsert(stream payload.v1.Upsert.Request) returns (stream payload.v1.Object.StreamLocation) {} // A method to insert/update multiple vectors in a single request. - rpc MultiUpsert(payload.v1.Upsert.MultiRequest) - returns (payload.v1.Object.Locations) { + rpc MultiUpsert(payload.v1.Upsert.MultiRequest) returns (payload.v1.Object.Locations) { option (google.api.http) = { - post : "/upsert/multiple" - body : "*" + post: "/upsert/multiple" + body: "*" }; } } diff --git a/versions/BUF_VERSION b/versions/BUF_VERSION new file mode 100644 index 0000000000..e3e48c4c4f --- /dev/null +++ b/versions/BUF_VERSION @@ -0,0 +1 @@ +v1.22.0