Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthInterceptor ¶
func AuthInterceptor(validateToken func(string) (context.Context, error)) grpc.UnaryServerInterceptor
AuthInterceptor validates authentication tokens
func LoggingInterceptor ¶
func LoggingInterceptor() grpc.UnaryServerInterceptor
LoggingInterceptor logs all gRPC requests
func MetricsInterceptor ¶
func MetricsInterceptor() grpc.UnaryServerInterceptor
MetricsInterceptor tracks request metrics
func RecoveryInterceptor ¶
func RecoveryInterceptor() grpc.UnaryServerInterceptor
RecoveryInterceptor recovers from panics
Types ¶
type Server ¶
Server wraps a gRPC server with middleware support
func (*Server) Build ¶
func (s *Server) Build()
Build builds the gRPC server with all options and interceptors
func (*Server) GracefulStop ¶
func (s *Server) GracefulStop()
GracefulStop gracefully stops the gRPC server
func (*Server) UseStreamInterceptor ¶
func (s *Server) UseStreamInterceptor(interceptor grpc.StreamServerInterceptor)
UseStreamInterceptor adds a stream interceptor
func (*Server) UseUnaryInterceptor ¶
func (s *Server) UseUnaryInterceptor(interceptor grpc.UnaryServerInterceptor)
UseUnaryInterceptor adds a unary interceptor (middleware)
Click to show internal directories.
Click to hide internal directories.