interceptors

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2026 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

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.

Jump to

Keyboard shortcuts

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