-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: KVS API template for storing vector metadata
- Loading branch information
1 parent
801cb31
commit 312410f
Showing
83 changed files
with
2,774 additions
and
2,662 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,28 @@ | ||
// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. | ||
// protoc-gen-go-vtproto version: v0.6.0 | ||
// source: v1/agent/core/agent.proto | ||
// | ||
// Copyright (C) 2019-2024 vdaas.org vald team <[email protected]> | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// You may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// https://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// | ||
|
||
package core | ||
|
||
import ( | ||
context "context" | ||
|
||
payload "github.com/vdaas/vald/apis/grpc/v1/payload" | ||
grpc "google.golang.org/grpc" | ||
codes "github.com/vdaas/vald/internal/net/grpc/codes" | ||
status "github.com/vdaas/vald/internal/net/grpc/status" | ||
grpc "google.golang.org/grpc" | ||
protoimpl "google.golang.org/protobuf/runtime/protoimpl" | ||
) | ||
|
||
|
@@ -45,7 +58,9 @@ func NewAgentClient(cc grpc.ClientConnInterface) AgentClient { | |
return &agentClient{cc} | ||
} | ||
|
||
func (c *agentClient) CreateIndex(ctx context.Context, in *payload.Control_CreateIndexRequest, opts ...grpc.CallOption) (*payload.Empty, error) { | ||
func (c *agentClient) CreateIndex( | ||
ctx context.Context, in *payload.Control_CreateIndexRequest, opts ...grpc.CallOption, | ||
) (*payload.Empty, error) { | ||
out := new(payload.Empty) | ||
err := c.cc.Invoke(ctx, "/core.v1.Agent/CreateIndex", in, out, opts...) | ||
if err != nil { | ||
|
@@ -54,7 +69,9 @@ func (c *agentClient) CreateIndex(ctx context.Context, in *payload.Control_Creat | |
return out, nil | ||
} | ||
|
||
func (c *agentClient) SaveIndex(ctx context.Context, in *payload.Empty, opts ...grpc.CallOption) (*payload.Empty, error) { | ||
func (c *agentClient) SaveIndex( | ||
ctx context.Context, in *payload.Empty, opts ...grpc.CallOption, | ||
) (*payload.Empty, error) { | ||
out := new(payload.Empty) | ||
err := c.cc.Invoke(ctx, "/core.v1.Agent/SaveIndex", in, out, opts...) | ||
if err != nil { | ||
|
@@ -63,7 +80,9 @@ func (c *agentClient) SaveIndex(ctx context.Context, in *payload.Empty, opts ... | |
return out, nil | ||
} | ||
|
||
func (c *agentClient) CreateAndSaveIndex(ctx context.Context, in *payload.Control_CreateIndexRequest, opts ...grpc.CallOption) (*payload.Empty, error) { | ||
func (c *agentClient) CreateAndSaveIndex( | ||
ctx context.Context, in *payload.Control_CreateIndexRequest, opts ...grpc.CallOption, | ||
) (*payload.Empty, error) { | ||
out := new(payload.Empty) | ||
err := c.cc.Invoke(ctx, "/core.v1.Agent/CreateAndSaveIndex", in, out, opts...) | ||
if err != nil { | ||
|
@@ -86,16 +105,21 @@ type AgentServer interface { | |
} | ||
|
||
// UnimplementedAgentServer must be embedded to have forward compatible implementations. | ||
type UnimplementedAgentServer struct { | ||
} | ||
type UnimplementedAgentServer struct{} | ||
|
||
func (UnimplementedAgentServer) CreateIndex(context.Context, *payload.Control_CreateIndexRequest) (*payload.Empty, error) { | ||
func (UnimplementedAgentServer) CreateIndex( | ||
context.Context, *payload.Control_CreateIndexRequest, | ||
) (*payload.Empty, error) { | ||
return nil, status.Errorf(codes.Unimplemented, "method CreateIndex not implemented") | ||
} | ||
|
||
func (UnimplementedAgentServer) SaveIndex(context.Context, *payload.Empty) (*payload.Empty, error) { | ||
return nil, status.Errorf(codes.Unimplemented, "method SaveIndex not implemented") | ||
} | ||
func (UnimplementedAgentServer) CreateAndSaveIndex(context.Context, *payload.Control_CreateIndexRequest) (*payload.Empty, error) { | ||
|
||
func (UnimplementedAgentServer) CreateAndSaveIndex( | ||
context.Context, *payload.Control_CreateIndexRequest, | ||
) (*payload.Empty, error) { | ||
return nil, status.Errorf(codes.Unimplemented, "method CreateAndSaveIndex not implemented") | ||
} | ||
func (UnimplementedAgentServer) mustEmbedUnimplementedAgentServer() {} | ||
|
@@ -111,7 +135,9 @@ func RegisterAgentServer(s grpc.ServiceRegistrar, srv AgentServer) { | |
s.RegisterService(&Agent_ServiceDesc, srv) | ||
} | ||
|
||
func _Agent_CreateIndex_Handler(srv any, ctx context.Context, dec func(any) error, interceptor grpc.UnaryServerInterceptor) (any, error) { | ||
func _Agent_CreateIndex_Handler( | ||
srv any, ctx context.Context, dec func(any) error, interceptor grpc.UnaryServerInterceptor, | ||
) (any, error) { | ||
in := new(payload.Control_CreateIndexRequest) | ||
if err := dec(in); err != nil { | ||
return nil, err | ||
|
@@ -129,7 +155,9 @@ func _Agent_CreateIndex_Handler(srv any, ctx context.Context, dec func(any) erro | |
return interceptor(ctx, in, info, handler) | ||
} | ||
|
||
func _Agent_SaveIndex_Handler(srv any, ctx context.Context, dec func(any) error, interceptor grpc.UnaryServerInterceptor) (any, error) { | ||
func _Agent_SaveIndex_Handler( | ||
srv any, ctx context.Context, dec func(any) error, interceptor grpc.UnaryServerInterceptor, | ||
) (any, error) { | ||
in := new(payload.Empty) | ||
if err := dec(in); err != nil { | ||
return nil, err | ||
|
@@ -147,7 +175,9 @@ func _Agent_SaveIndex_Handler(srv any, ctx context.Context, dec func(any) error, | |
return interceptor(ctx, in, info, handler) | ||
} | ||
|
||
func _Agent_CreateAndSaveIndex_Handler(srv any, ctx context.Context, dec func(any) error, interceptor grpc.UnaryServerInterceptor) (any, error) { | ||
func _Agent_CreateAndSaveIndex_Handler( | ||
srv any, ctx context.Context, dec func(any) error, interceptor grpc.UnaryServerInterceptor, | ||
) (any, error) { | ||
in := new(payload.Control_CreateIndexRequest) | ||
if err := dec(in); err != nil { | ||
return nil, err | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,18 @@ | ||
// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. | ||
// protoc-gen-go-vtproto version: v0.6.0 | ||
// source: v1/agent/sidecar/sidecar.proto | ||
// | ||
// Copyright (C) 2019-2024 vdaas.org vald team <[email protected]> | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// You may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// https://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// | ||
|
||
package sidecar | ||
|
||
|
@@ -24,8 +36,7 @@ const _ = grpc.SupportPackageIsVersion7 | |
// SidecarClient is the client API for Sidecar service. | ||
// | ||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. | ||
type SidecarClient interface { | ||
} | ||
type SidecarClient interface{} | ||
|
||
type sidecarClient struct { | ||
cc grpc.ClientConnInterface | ||
|
@@ -43,8 +54,7 @@ type SidecarServer interface { | |
} | ||
|
||
// UnimplementedSidecarServer must be embedded to have forward compatible implementations. | ||
type UnimplementedSidecarServer struct { | ||
} | ||
type UnimplementedSidecarServer struct{} | ||
|
||
func (UnimplementedSidecarServer) mustEmbedUnimplementedSidecarServer() {} | ||
|
||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,28 @@ | ||
// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. | ||
// protoc-gen-go-vtproto version: v0.6.0 | ||
// source: v1/discoverer/discoverer.proto | ||
// | ||
// Copyright (C) 2019-2024 vdaas.org vald team <[email protected]> | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// You may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// https://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// | ||
|
||
package discoverer | ||
|
||
import ( | ||
context "context" | ||
|
||
payload "github.com/vdaas/vald/apis/grpc/v1/payload" | ||
grpc "google.golang.org/grpc" | ||
codes "github.com/vdaas/vald/internal/net/grpc/codes" | ||
status "github.com/vdaas/vald/internal/net/grpc/status" | ||
grpc "google.golang.org/grpc" | ||
protoimpl "google.golang.org/protobuf/runtime/protoimpl" | ||
) | ||
|
||
|
@@ -45,7 +58,9 @@ func NewDiscovererClient(cc grpc.ClientConnInterface) DiscovererClient { | |
return &discovererClient{cc} | ||
} | ||
|
||
func (c *discovererClient) Pods(ctx context.Context, in *payload.Discoverer_Request, opts ...grpc.CallOption) (*payload.Info_Pods, error) { | ||
func (c *discovererClient) Pods( | ||
ctx context.Context, in *payload.Discoverer_Request, opts ...grpc.CallOption, | ||
) (*payload.Info_Pods, error) { | ||
out := new(payload.Info_Pods) | ||
err := c.cc.Invoke(ctx, "/discoverer.v1.Discoverer/Pods", in, out, opts...) | ||
if err != nil { | ||
|
@@ -54,7 +69,9 @@ func (c *discovererClient) Pods(ctx context.Context, in *payload.Discoverer_Requ | |
return out, nil | ||
} | ||
|
||
func (c *discovererClient) Nodes(ctx context.Context, in *payload.Discoverer_Request, opts ...grpc.CallOption) (*payload.Info_Nodes, error) { | ||
func (c *discovererClient) Nodes( | ||
ctx context.Context, in *payload.Discoverer_Request, opts ...grpc.CallOption, | ||
) (*payload.Info_Nodes, error) { | ||
out := new(payload.Info_Nodes) | ||
err := c.cc.Invoke(ctx, "/discoverer.v1.Discoverer/Nodes", in, out, opts...) | ||
if err != nil { | ||
|
@@ -63,7 +80,9 @@ func (c *discovererClient) Nodes(ctx context.Context, in *payload.Discoverer_Req | |
return out, nil | ||
} | ||
|
||
func (c *discovererClient) Services(ctx context.Context, in *payload.Discoverer_Request, opts ...grpc.CallOption) (*payload.Info_Services, error) { | ||
func (c *discovererClient) Services( | ||
ctx context.Context, in *payload.Discoverer_Request, opts ...grpc.CallOption, | ||
) (*payload.Info_Services, error) { | ||
out := new(payload.Info_Services) | ||
err := c.cc.Invoke(ctx, "/discoverer.v1.Discoverer/Services", in, out, opts...) | ||
if err != nil { | ||
|
@@ -86,16 +105,23 @@ type DiscovererServer interface { | |
} | ||
|
||
// UnimplementedDiscovererServer must be embedded to have forward compatible implementations. | ||
type UnimplementedDiscovererServer struct { | ||
} | ||
type UnimplementedDiscovererServer struct{} | ||
|
||
func (UnimplementedDiscovererServer) Pods(context.Context, *payload.Discoverer_Request) (*payload.Info_Pods, error) { | ||
func (UnimplementedDiscovererServer) Pods( | ||
context.Context, *payload.Discoverer_Request, | ||
) (*payload.Info_Pods, error) { | ||
return nil, status.Errorf(codes.Unimplemented, "method Pods not implemented") | ||
} | ||
func (UnimplementedDiscovererServer) Nodes(context.Context, *payload.Discoverer_Request) (*payload.Info_Nodes, error) { | ||
|
||
func (UnimplementedDiscovererServer) Nodes( | ||
context.Context, *payload.Discoverer_Request, | ||
) (*payload.Info_Nodes, error) { | ||
return nil, status.Errorf(codes.Unimplemented, "method Nodes not implemented") | ||
} | ||
func (UnimplementedDiscovererServer) Services(context.Context, *payload.Discoverer_Request) (*payload.Info_Services, error) { | ||
|
||
func (UnimplementedDiscovererServer) Services( | ||
context.Context, *payload.Discoverer_Request, | ||
) (*payload.Info_Services, error) { | ||
return nil, status.Errorf(codes.Unimplemented, "method Services not implemented") | ||
} | ||
func (UnimplementedDiscovererServer) mustEmbedUnimplementedDiscovererServer() {} | ||
|
@@ -111,7 +137,9 @@ func RegisterDiscovererServer(s grpc.ServiceRegistrar, srv DiscovererServer) { | |
s.RegisterService(&Discoverer_ServiceDesc, srv) | ||
} | ||
|
||
func _Discoverer_Pods_Handler(srv any, ctx context.Context, dec func(any) error, interceptor grpc.UnaryServerInterceptor) (any, error) { | ||
func _Discoverer_Pods_Handler( | ||
srv any, ctx context.Context, dec func(any) error, interceptor grpc.UnaryServerInterceptor, | ||
) (any, error) { | ||
in := new(payload.Discoverer_Request) | ||
if err := dec(in); err != nil { | ||
return nil, err | ||
|
@@ -129,7 +157,9 @@ func _Discoverer_Pods_Handler(srv any, ctx context.Context, dec func(any) error, | |
return interceptor(ctx, in, info, handler) | ||
} | ||
|
||
func _Discoverer_Nodes_Handler(srv any, ctx context.Context, dec func(any) error, interceptor grpc.UnaryServerInterceptor) (any, error) { | ||
func _Discoverer_Nodes_Handler( | ||
srv any, ctx context.Context, dec func(any) error, interceptor grpc.UnaryServerInterceptor, | ||
) (any, error) { | ||
in := new(payload.Discoverer_Request) | ||
if err := dec(in); err != nil { | ||
return nil, err | ||
|
@@ -147,7 +177,9 @@ func _Discoverer_Nodes_Handler(srv any, ctx context.Context, dec func(any) error | |
return interceptor(ctx, in, info, handler) | ||
} | ||
|
||
func _Discoverer_Services_Handler(srv any, ctx context.Context, dec func(any) error, interceptor grpc.UnaryServerInterceptor) (any, error) { | ||
func _Discoverer_Services_Handler( | ||
srv any, ctx context.Context, dec func(any) error, interceptor grpc.UnaryServerInterceptor, | ||
) (any, error) { | ||
in := new(payload.Discoverer_Request) | ||
if err := dec(in); err != nil { | ||
return nil, err | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.