Documentation ¶
Index ¶
- Constants
- func FromContext(ctx context.Context) string
- func NewHandler(handler http.Handler) http.Handler
- func NewLogHandler(field string, h slog.Handler) slog.Handler
- func StreamServerInterceptor(srv interface{}, ss grpc.ServerStream, _ *grpc.StreamServerInfo, ...) error
- func UnaryServerInterceptor(ctx context.Context, req interface{}, _ *grpc.UnaryServerInfo, ...) (interface{}, error)
Constants ¶
View Source
const ( HeaderName = "X-Request-ID" ContextKey = "servicebase_request_id" GRPCMetadataKey = ContextKey )
View Source
const (
DefaultLoggerFieldName = "request_id"
)
Variables ¶
This section is empty.
Functions ¶
func FromContext ¶
func StreamServerInterceptor ¶
func StreamServerInterceptor(srv interface{}, ss grpc.ServerStream, _ *grpc.StreamServerInfo, handler grpc.StreamHandler) error
func UnaryServerInterceptor ¶
func UnaryServerInterceptor(ctx context.Context, req interface{}, _ *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.