interceptor

package
v0.0.0-...-53c86a8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 28, 2021 License: MIT Imports: 4 Imported by: 1

Documentation

Overview

Package interceptor provides GRPC UnaryInterceptors to use with a GRPC server.

This LogGRPC UnaryServerInterceptor is taken from https://github.com/kubernetes-csi/csi-driver-host-path/blob/v1.6.0/pkg/hostpath/server.go#L116.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LogGRPC

func LogGRPC(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)

LogGRPC handles logging of the GRPC requests. The log messages are sanitized to remove any sensitive data.

func LogGRPCWithNameAndValues

func LogGRPCWithNameAndValues(name string, tags ...interface{}) grpc.UnaryServerInterceptor

LogGRPCWithName allows setting the logger name and values in LogGRPC logs.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL