Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StreamServerInterceptor ¶
func StreamServerInterceptor(fields ...FieldSpec) grpc.StreamServerInterceptor
StreamServerInterceptor creates an interceptor for extracting fields from requests and setting them as log tags.
func UnaryServerInterceptor ¶
func UnaryServerInterceptor(fields ...FieldSpec) grpc.UnaryServerInterceptor
UnaryServerInterceptor creates an interceptor for extracting fields from requests and setting them as log tags.
Types ¶
type FieldSpec ¶
type FieldSpec struct {
// contains filtered or unexported fields
}
FieldSpec provides a mapping between a metadata context field and a logging field.
func ExtractMetadataField ¶
ExtractMetadataField creates a specification for converting gRPC metadata fields to log tags.
Click to show internal directories.
Click to hide internal directories.