core

package
v1.7.12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 21, 2024 License: Apache-2.0 Imports: 9 Imported by: 3

Documentation

Overview

Package core provides core agent server interface

Index

Constants

View Source
const (
	CreateIndexRPCName        = "CreateIndex"
	SaveIndexRPCName          = "SaveIndex"
	CreateAndSaveIndexRPCName = "CreateAndSaveIndex"
	IndexInfoRPCName          = "IndexInfo"
	GetTimestampRPCName       = "GetTimestamp"
)

Variables

View Source
var Agent_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "core.v1.Agent",
	HandlerType: (*AgentServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateIndex",
			Handler:    _Agent_CreateIndex_Handler,
		},
		{
			MethodName: "SaveIndex",
			Handler:    _Agent_SaveIndex_Handler,
		},
		{
			MethodName: "CreateAndSaveIndex",
			Handler:    _Agent_CreateAndSaveIndex_Handler,
		},
		{
			MethodName: "IndexInfo",
			Handler:    _Agent_IndexInfo_Handler,
		},
		{
			MethodName: "GetTimestamp",
			Handler:    _Agent_GetTimestamp_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "v1/agent/core/agent.proto",
}

Agent_ServiceDesc is the grpc.ServiceDesc for Agent service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_v1_agent_core_agent_proto protoreflect.FileDescriptor

Functions

func RegisterAgentServer

func RegisterAgentServer(s grpc.ServiceRegistrar, srv AgentServer)

Types

type AgentClient

type AgentClient interface {
	// Represent the creating index RPC.
	CreateIndex(ctx context.Context, in *payload.Control_CreateIndexRequest, opts ...grpc.CallOption) (*payload.Empty, error)
	// Represent the saving index RPC.
	SaveIndex(ctx context.Context, in *payload.Empty, opts ...grpc.CallOption) (*payload.Empty, error)
	// Represent the creating and saving index RPC.
	CreateAndSaveIndex(ctx context.Context, in *payload.Control_CreateIndexRequest, opts ...grpc.CallOption) (*payload.Empty, error)
	// Represent the RPC to get the agent index information.
	IndexInfo(ctx context.Context, in *payload.Empty, opts ...grpc.CallOption) (*payload.Info_Index_Count, error)
	// Represent the RPC to get the vector metadata. This RPC is mainly used for index correction process
	GetTimestamp(ctx context.Context, in *payload.Object_GetTimestampRequest, opts ...grpc.CallOption) (*payload.Object_Timestamp, error)
}

AgentClient is the client API for Agent 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.

func NewAgentClient

func NewAgentClient(cc grpc.ClientConnInterface) AgentClient

type AgentServer

type AgentServer interface {
	// Represent the creating index RPC.
	CreateIndex(context.Context, *payload.Control_CreateIndexRequest) (*payload.Empty, error)
	// Represent the saving index RPC.
	SaveIndex(context.Context, *payload.Empty) (*payload.Empty, error)
	// Represent the creating and saving index RPC.
	CreateAndSaveIndex(context.Context, *payload.Control_CreateIndexRequest) (*payload.Empty, error)
	// Represent the RPC to get the agent index information.
	IndexInfo(context.Context, *payload.Empty) (*payload.Info_Index_Count, error)
	// Represent the RPC to get the vector metadata. This RPC is mainly used for index correction process
	GetTimestamp(context.Context, *payload.Object_GetTimestampRequest) (*payload.Object_Timestamp, error)
	// contains filtered or unexported methods
}

AgentServer is the server API for Agent service. All implementations must embed UnimplementedAgentServer for forward compatibility

type UnimplementedAgentServer

type UnimplementedAgentServer struct {
}

UnimplementedAgentServer must be embedded to have forward compatible implementations.

func (UnimplementedAgentServer) CreateAndSaveIndex

func (UnimplementedAgentServer) CreateIndex

func (UnimplementedAgentServer) GetTimestamp added in v1.7.9

func (UnimplementedAgentServer) IndexInfo

func (UnimplementedAgentServer) SaveIndex

type UnsafeAgentServer added in v1.2.1

type UnsafeAgentServer interface {
	// contains filtered or unexported methods
}

UnsafeAgentServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AgentServer will result in compilation errors.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL