Documentation ¶
Index ¶
- func ClientTraceInterceptor() grpc.UnaryClientInterceptor
- func InterceptorLogger(s *slog.Logger) logging.Logger
- func LogInterceptor(ctx context.Context, req any, info *grpc.UnaryServerInfo, ...) (any, error)
- func LoggingInterceptor() grpc.UnaryServerInterceptor
- func NopInterceptor(ctx context.Context, req any, info *grpc.UnaryServerInfo, ...) (any, error)
- func ServerTraceInterceptor() grpc.UnaryServerInterceptor
- type Profiler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClientTraceInterceptor ¶
func ClientTraceInterceptor() grpc.UnaryClientInterceptor
ClientTraceInterceptor implements client tracing interceptor
func InterceptorLogger ¶
InterceptorLogger adapts slog logger to interceptor logger
func LogInterceptor ¶
func LogInterceptor(ctx context.Context, req any, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (any, error)
LogInterceptor logs grpc request records
func LoggingInterceptor ¶
func LoggingInterceptor() grpc.UnaryServerInterceptor
LoggingInterceptor implements logging UnaryServerInterceptor
func NopInterceptor ¶
func NopInterceptor(ctx context.Context, req any, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (any, error)
NopInterceptor logs grpc request records
func ServerTraceInterceptor ¶
func ServerTraceInterceptor() grpc.UnaryServerInterceptor
ServerTraceInterceptor implements server tracing
Types ¶
type Profiler ¶
type Profiler struct {
Endpoint string
}
Profiler is a middleware for pprof
func NewProfiler ¶
NewProfiler creates a new profiler instance
Click to show internal directories.
Click to hide internal directories.