Documentation ¶
Index ¶
- func CertFromServerContext(ctx context.Context) (cert *x509.Certificate, valid bool)
- func HTTPLogger(request *http.Request, base *zap.Logger) *zap.Logger
- func HTTPLoggerFields(request *http.Request) []zap.Field
- func MaskContains(mask *fieldmaskpb.FieldMask, field string) bool
- func ServerLogger(ctx context.Context, base *zap.Logger) *zap.Logger
- func ServerLoggerFields(ctx context.Context) []zap.Field
- func ServiceMethod(ctx context.Context) (service, method string, ok bool)
- func SplitMethodPath(methodPath string) (service, method string, ok bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CertFromServerContext ¶
func CertFromServerContext(ctx context.Context) (cert *x509.Certificate, valid bool)
CertFromServerContext returns the peer provided certificate any whether it id valid or not.
func MaskContains ¶
func MaskContains(mask *fieldmaskpb.FieldMask, field string) bool
func ServerLogger ¶
ServerLogger creates a sub-logger with fields derived from a gRPC server context.
func ServiceMethod ¶
ServiceMethod retrieves the service name and method name from a gRPC server context. Works like grpc.Method, but splits the path into service and method parts.
func SplitMethodPath ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.