Documentation
¶
Overview ¶
Package grpcserver implements the gRPC service for privacy-preserving vector search.
It delegates all business logic to internal/service.SearchService, translating between protobuf messages and service-layer types.
Index ¶
- func LoadTLSCredentials(certFile, keyFile string) (credentials.TransportCredentials, error)
- func LoggingStreamInterceptor() grpc.StreamServerInterceptor
- func LoggingUnaryInterceptor() grpc.UnaryServerInterceptor
- func RecoveryStreamInterceptor() grpc.StreamServerInterceptor
- func RecoveryUnaryInterceptor() grpc.UnaryServerInterceptor
- type Server
- func (s *Server) ComputeScores(ctx context.Context, req *pb.ScoreRequest) (*pb.ScoreResponse, error)
- func (s *Server) ComputeScoresStream(req *pb.ScoreRequest, stream pb.OpaqueSearch_ComputeScoresStreamServer) error
- func (s *Server) GetCandidates(ctx context.Context, req *pb.CandidateRequest) (*pb.CandidateResponse, error)
- func (s *Server) GetPlanes(ctx context.Context, req *pb.GetPlanesRequest) (*pb.GetPlanesResponse, error)
- func (s *Server) HealthCheck(ctx context.Context, _ *pb.HealthCheckRequest) (*pb.HealthCheckResponse, error)
- func (s *Server) RegisterKey(ctx context.Context, req *pb.RegisterKeyRequest) (*pb.RegisterKeyResponse, error)
- func (s *Server) Search(ctx context.Context, req *pb.SearchRequest) (*pb.SearchResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadTLSCredentials ¶
func LoadTLSCredentials(certFile, keyFile string) (credentials.TransportCredentials, error)
LoadTLSCredentials loads a TLS certificate and key for server-side TLS.
func LoggingStreamInterceptor ¶
func LoggingStreamInterceptor() grpc.StreamServerInterceptor
LoggingStreamInterceptor returns a stream interceptor that logs each streaming RPC.
func LoggingUnaryInterceptor ¶
func LoggingUnaryInterceptor() grpc.UnaryServerInterceptor
LoggingUnaryInterceptor returns a unary interceptor that logs each RPC call.
func RecoveryStreamInterceptor ¶
func RecoveryStreamInterceptor() grpc.StreamServerInterceptor
RecoveryStreamInterceptor returns a stream interceptor that recovers from panics.
func RecoveryUnaryInterceptor ¶
func RecoveryUnaryInterceptor() grpc.UnaryServerInterceptor
RecoveryUnaryInterceptor returns a unary interceptor that recovers from panics.
Types ¶
type Server ¶
type Server struct {
pb.UnimplementedOpaqueSearchServer
// contains filtered or unexported fields
}
Server implements the OpaqueSearchServer gRPC interface.
func New ¶
func New(svc *service.SearchService) *Server
New creates a new gRPC server backed by the given SearchService.
func (*Server) ComputeScores ¶
func (s *Server) ComputeScores(ctx context.Context, req *pb.ScoreRequest) (*pb.ScoreResponse, error)
func (*Server) ComputeScoresStream ¶
func (s *Server) ComputeScoresStream(req *pb.ScoreRequest, stream pb.OpaqueSearch_ComputeScoresStreamServer) error
func (*Server) GetCandidates ¶
func (s *Server) GetCandidates(ctx context.Context, req *pb.CandidateRequest) (*pb.CandidateResponse, error)
func (*Server) GetPlanes ¶
func (s *Server) GetPlanes(ctx context.Context, req *pb.GetPlanesRequest) (*pb.GetPlanesResponse, error)
func (*Server) HealthCheck ¶
func (s *Server) HealthCheck(ctx context.Context, _ *pb.HealthCheckRequest) (*pb.HealthCheckResponse, error)
func (*Server) RegisterKey ¶
func (s *Server) RegisterKey(ctx context.Context, req *pb.RegisterKeyRequest) (*pb.RegisterKeyResponse, error)
func (*Server) Search ¶
func (s *Server) Search(ctx context.Context, req *pb.SearchRequest) (*pb.SearchResponse, error)