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 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 method pb.AddLogFields
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 method pb.AddLogFields
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 options and log interceptors
func LogConnStatusChanges ¶ added in v0.0.3
LogConnStatusChanges logs gRPC connection status changes
func NewBblfshProxyServer ¶ added in v0.5.0
NewBblfshProxyServer creates gRPC server that proxies call to bblfsh
Types ¶
This section is empty.