grpcserver

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2026 License: MIT Imports: 13 Imported by: 0

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

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)

Jump to

Keyboard shortcuts

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