package
0.0.0-20241120095005-f07edaf5bdfe
Repository: https://github.com/apstndb/go-grpcinterceptors.git
Documentation: pkg.go.dev

# Functions

No description provided by the author
DurationToDurationField uses a Duration field to log the request duration and leaves it up to Log's encoder settings to determine how that is output.
DurationToTimeMillisFields converts the duration to milliseconds and uses the key `grpc.time_ms`.
StreamClientInterceptor is a gRPC client-side interceptor that provides reporting for Stream RPCs.
WithCodes customizes the function for mapping errors to error codes.
WithDisableLoggingFields disables logging of gRPC fields provided.
WithDurationField customizes the function for mapping request durations to log fields.
WithFieldsFromContext allows overriding existing or adding extra fields to all log messages per given context.
WithFieldsFromContextAndCallMeta allows overriding existing or adding extra fields to all log messages per given context and interceptor.CallMeta.
WithLevels customizes the function for mapping gRPC return codes and interceptor log level statements.
WithLogOnEvents customizes on what events the gRPC interceptor should log on.
WithTimestampFormat customizes the timestamps emitted in the log fields.

# Constants

FinishCall is a loggable event representing finish of the gRPC call.
PayloadReceived is a loggable event representing received request (server) or response (client).
PayloadSent is a loggable event representing sent response (server) or request (client).
StartCall is a loggable event representing start of the gRPC call.

# Variables

DefaultDurationToFields is the default implementation of converting request duration to a field.

# Interfaces

No description provided by the author
No description provided by the author
No description provided by the author

# Type aliases

DurationToFields function defines how to produce duration fields for logging.
ErrorToCode function determines the error code of an error.
LoggableEvent defines the events a log line can be added on.
No description provided by the author