Skip to content

Commit

Permalink
feat: KVS API template for storing vector metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
deepsource-autofix[bot] authored and smorihira committed Sep 10, 2024
1 parent 801cb31 commit 312410f
Show file tree
Hide file tree
Showing 83 changed files with 2,774 additions and 2,662 deletions.
2,661 changes: 939 additions & 1,722 deletions apis/docs/v1/docs.md

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion apis/grpc/v1/agent/core/agent.pb.go

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

58 changes: 44 additions & 14 deletions apis/grpc/v1/agent/core/agent_vtproto.pb.go
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"
)

Expand Down Expand Up @@ -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 {
Expand All @@ -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 {
Expand All @@ -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 {
Expand All @@ -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() {}
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
21 changes: 12 additions & 9 deletions apis/grpc/v1/agent/sidecar/sidecar.pb.go

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

24 changes: 17 additions & 7 deletions apis/grpc/v1/agent/sidecar/sidecar_vtproto.pb.go
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

Expand All @@ -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
Expand All @@ -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() {}

Expand Down
4 changes: 3 additions & 1 deletion apis/grpc/v1/discoverer/discoverer.pb.go

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

62 changes: 47 additions & 15 deletions apis/grpc/v1/discoverer/discoverer_vtproto.pb.go
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"
)

Expand Down Expand Up @@ -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 {
Expand All @@ -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 {
Expand All @@ -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 {
Expand All @@ -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() {}
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
4 changes: 3 additions & 1 deletion apis/grpc/v1/filter/egress/egress_filter.pb.go

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

Loading

0 comments on commit 312410f

Please sign in to comment.