Documentation ¶
Index ¶
- Variables
- func CtxlogStreamClientInterceptor(ctx context.Context, desc *grpc.StreamDesc, cc *grpc.ClientConn, method string, ...) (grpc.ClientStream, error)
- func CtxlogStreamServerInterceptor(srv interface{}, stream grpc.ServerStream, info *grpc.StreamServerInfo, ...) error
- func CtxlogUnaryClientInterceptor(ctx context.Context, method string, req, reply interface{}, ...) error
- func CtxlogUnaryServerInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, ...) (interface{}, error)
- func DialContext(ctx context.Context, target string, opts ...grpc.DialOption) (*grpc.ClientConn, error)
- func LogConnStatusChanges(ctx context.Context, l log.Logger, conn *grpc.ClientConn)
- func LogStreamClientInterceptor(asDebug bool) grpc.StreamClientInterceptor
- func LogStreamServerInterceptor(asDebug bool) grpc.StreamServerInterceptor
- func LogUnaryClientInterceptor(asDebug bool) grpc.UnaryClientInterceptor
- func LogUnaryServerInterceptor(asDebug bool) grpc.UnaryServerInterceptor
- func NewBblfshProxyServer(addr string) (*grpc.Server, error)
- func NewServer(opts ...grpc.ServerOption) *grpc.Server
Constants ¶
This section is empty.
Variables ¶
var LogAsDebug = false
LogAsDebug allows to log gRPC messages as debug level instead of info level
Functions ¶
func CtxlogStreamClientInterceptor ¶ added in v0.8.0
func CtxlogStreamClientInterceptor(ctx context.Context, desc *grpc.StreamDesc, cc *grpc.ClientConn, method string, streamer grpc.Streamer, opts ...grpc.CallOption) (grpc.ClientStream, error)
CtxlogStreamClientInterceptor is a streaming client interceptor that adds the ctxlog log.Fields to the grpc metadata, with the key 'logFieldsKey'.
func CtxlogStreamServerInterceptor ¶ added in v0.8.0
func CtxlogStreamServerInterceptor(srv interface{}, stream grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler) error
CtxlogStreamServerInterceptor is a streaming server interceptor that adds to the context a ctxlog configured with the log Fields found in the request metadata.
func CtxlogUnaryClientInterceptor ¶ added in v0.8.0
func CtxlogUnaryClientInterceptor(ctx context.Context, method string, req, reply interface{}, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption) error
CtxlogUnaryClientInterceptor is a unary client interceptor that adds the ctxlog log.Fields to the grpc metadata, with the key 'logFieldsKey'.
func CtxlogUnaryServerInterceptor ¶ added in v0.8.0
func CtxlogUnaryServerInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)
CtxlogUnaryServerInterceptor is a unary server interceptor that adds to the context a ctxlog configured with the log Fields found in the request metadata.
func DialContext ¶
func DialContext(ctx context.Context, target string, opts ...grpc.DialOption) (*grpc.ClientConn, error)
DialContext creates a client connection to the given target with custom message size
func LogConnStatusChanges ¶ added in v0.0.3
LogConnStatusChanges logs gRPC connection status changes
func LogStreamClientInterceptor ¶ added in v0.8.0
func LogStreamClientInterceptor(asDebug bool) grpc.StreamClientInterceptor
LogStreamClientInterceptor returns a new streaming client interceptor that logs the execution of external gRPC calls.
func LogStreamServerInterceptor ¶ added in v0.8.0
func LogStreamServerInterceptor(asDebug bool) grpc.StreamServerInterceptor
LogStreamServerInterceptor returns a new streaming server interceptor that logs request/response.
func LogUnaryClientInterceptor ¶ added in v0.8.0
func LogUnaryClientInterceptor(asDebug bool) grpc.UnaryClientInterceptor
LogUnaryClientInterceptor returns a new unary client interceptor that logs the execution of external gRPC calls.
func LogUnaryServerInterceptor ¶ added in v0.8.0
func LogUnaryServerInterceptor(asDebug bool) grpc.UnaryServerInterceptor
LogUnaryServerInterceptor returns a new unary server interceptor that logs request/response.
func NewBblfshProxyServer ¶ added in v0.5.0
NewBblfshProxyServer creates gRPC server that proxies call to bblfsh
Types ¶
This section is empty.