Documentation
¶
Index ¶
- func DefaultStreamInterceptors(log logging.Logger) []grpc.StreamServerInterceptor
- func DefaultUnaryInterceptors(log logging.Logger) []grpc.UnaryServerInterceptor
- func StreamLogging(log logging.Logger) grpc.StreamServerInterceptor
- func StreamPanicRecovery(log logging.Logger) grpc.StreamServerInterceptor
- func StreamPluginContext() grpc.StreamServerInterceptor
- func UnaryLogging(log logging.Logger) grpc.UnaryServerInterceptor
- func UnaryPanicRecovery(log logging.Logger) grpc.UnaryServerInterceptor
- func UnaryPluginContext() grpc.UnaryServerInterceptor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultStreamInterceptors ¶
func DefaultStreamInterceptors(log logging.Logger) []grpc.StreamServerInterceptor
DefaultStreamInterceptors returns the standard interceptor chain for stream RPCs. Order: recovery (outermost) → logging → context (innermost, closest to handler).
func DefaultUnaryInterceptors ¶
func DefaultUnaryInterceptors(log logging.Logger) []grpc.UnaryServerInterceptor
DefaultUnaryInterceptors returns the standard interceptor chain for unary RPCs. Order: recovery (outermost) → logging → context (innermost, closest to handler).
func StreamLogging ¶
func StreamLogging(log logging.Logger) grpc.StreamServerInterceptor
StreamLogging returns a stream interceptor that logs stream open/close with method and duration.
func StreamPanicRecovery ¶
func StreamPanicRecovery(log logging.Logger) grpc.StreamServerInterceptor
StreamPanicRecovery returns a stream server interceptor that recovers from panics, logs the stack trace, and returns a codes.Internal gRPC error.
func StreamPluginContext ¶
func StreamPluginContext() grpc.StreamServerInterceptor
StreamPluginContext returns a stream server interceptor that extracts PluginContext from gRPC metadata and attaches it to the context.
func UnaryLogging ¶
func UnaryLogging(log logging.Logger) grpc.UnaryServerInterceptor
UnaryLogging returns a unary interceptor that logs each RPC call with method, duration, and error.
func UnaryPanicRecovery ¶
func UnaryPanicRecovery(log logging.Logger) grpc.UnaryServerInterceptor
UnaryPanicRecovery returns a unary server interceptor that recovers from panics, logs the stack trace, and returns a codes.Internal gRPC error.
func UnaryPluginContext ¶
func UnaryPluginContext() grpc.UnaryServerInterceptor
UnaryPluginContext returns a unary server interceptor that extracts PluginContext from gRPC metadata and attaches it to the context.
Types ¶
This section is empty.