Documentation
¶
Index ¶
- Variables
- func RegisterVectorRetrievalServer(s grpc.ServiceRegistrar, srv VectorRetrievalServer)
- type UnimplementedVectorRetrievalServer
- type UnsafeVectorRetrievalServer
- type VectorReq
- type VectorResp
- func (*VectorResp) Descriptor() ([]byte, []int)deprecated
- func (x *VectorResp) GetLabels() []string
- func (x *VectorResp) GetRetval() []int64
- func (x *VectorResp) GetScores() []float32
- func (*VectorResp) ProtoMessage()
- func (x *VectorResp) ProtoReflect() protoreflect.Message
- func (x *VectorResp) Reset()
- func (x *VectorResp) String() string
- type VectorRetrievalClient
- type VectorRetrievalServer
Constants ¶
This section is empty.
Variables ¶
var File_vector_retrieval_proto protoreflect.FileDescriptor
var VectorRetrieval_ServiceDesc = grpc.ServiceDesc{ ServiceName: "VectorRetrieval", HandlerType: (*VectorRetrievalServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Search", Handler: _VectorRetrieval_Search_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "vector_retrieval.proto", }
VectorRetrieval_ServiceDesc is the grpc.ServiceDesc for VectorRetrieval service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterVectorRetrievalServer ¶
func RegisterVectorRetrievalServer(s grpc.ServiceRegistrar, srv VectorRetrievalServer)
Types ¶
type UnimplementedVectorRetrievalServer ¶
type UnimplementedVectorRetrievalServer struct { }
UnimplementedVectorRetrievalServer must be embedded to have forward compatible implementations.
func (UnimplementedVectorRetrievalServer) Search ¶
func (UnimplementedVectorRetrievalServer) Search(context.Context, *VectorReq) (*VectorResp, error)
type UnsafeVectorRetrievalServer ¶
type UnsafeVectorRetrievalServer interface {
// contains filtered or unexported methods
}
UnsafeVectorRetrievalServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to VectorRetrievalServer will result in compilation errors.
type VectorReq ¶
type VectorReq struct { // @inject_tag:form:"k" uri:"k" K int64 `protobuf:"varint,1,opt,name=k,proto3" json:"k,omitempty" form:"k" uri:"k"` // @inject_tag:form:"vector" uri:"vector" Vector []float32 `protobuf:"fixed32,2,rep,packed,name=vector,proto3" json:"vector,omitempty" form:"vector" uri:"vector"` // contains filtered or unexported fields }
func (*VectorReq) Descriptor
deprecated
func (*VectorReq) ProtoMessage ¶
func (*VectorReq) ProtoMessage()
func (*VectorReq) ProtoReflect ¶
func (x *VectorReq) ProtoReflect() protoreflect.Message
type VectorResp ¶
type VectorResp struct { Retval []int64 `protobuf:"varint,1,rep,packed,name=retval,proto3" json:"retval,omitempty"` Scores []float32 `protobuf:"fixed32,2,rep,packed,name=scores,proto3" json:"scores,omitempty"` Labels []string `protobuf:"bytes,3,rep,name=labels,proto3" json:"labels,omitempty"` // contains filtered or unexported fields }
func (*VectorResp) Descriptor
deprecated
func (*VectorResp) Descriptor() ([]byte, []int)
Deprecated: Use VectorResp.ProtoReflect.Descriptor instead.
func (*VectorResp) GetLabels ¶
func (x *VectorResp) GetLabels() []string
func (*VectorResp) GetRetval ¶
func (x *VectorResp) GetRetval() []int64
func (*VectorResp) GetScores ¶
func (x *VectorResp) GetScores() []float32
func (*VectorResp) ProtoMessage ¶
func (*VectorResp) ProtoMessage()
func (*VectorResp) ProtoReflect ¶
func (x *VectorResp) ProtoReflect() protoreflect.Message
func (*VectorResp) Reset ¶
func (x *VectorResp) Reset()
func (*VectorResp) String ¶
func (x *VectorResp) String() string
type VectorRetrievalClient ¶
type VectorRetrievalClient interface {
Search(ctx context.Context, in *VectorReq, opts ...grpc.CallOption) (*VectorResp, error)
}
VectorRetrievalClient is the client API for VectorRetrieval 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 NewVectorRetrievalClient ¶
func NewVectorRetrievalClient(cc grpc.ClientConnInterface) VectorRetrievalClient
type VectorRetrievalServer ¶
type VectorRetrievalServer interface { Search(context.Context, *VectorReq) (*VectorResp, error) // contains filtered or unexported methods }
VectorRetrievalServer is the server API for VectorRetrieval service. All implementations must embed UnimplementedVectorRetrievalServer for forward compatibility