grpchelper

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2018 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LogAsDebug = false

LogAsDebug allows to log gRPC messages as debug level instead of info level

Functions

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

func LogConnStatusChanges(ctx context.Context, l log.Logger, conn *grpc.ClientConn)

LogConnStatusChanges logs gRPC connection status changes

func NewBblfshProxyServer added in v0.5.0

func NewBblfshProxyServer(addr string) (*grpc.Server, error)

NewBblfshProxyServer creates gRPC server that proxies call to bblfsh

func NewServer

func NewServer(opts ...grpc.ServerOption) *grpc.Server

NewServer creates new grpc.Server with custom message size

func StreamClientInterceptor added in v0.0.3

func StreamClientInterceptor(l log.Logger, asDebug bool) grpc.StreamClientInterceptor

StreamClientInterceptor returns a new striming client interceptor that logs the execution of external gRPC calls.

func StreamServerInterceptor added in v0.0.3

func StreamServerInterceptor(l log.Logger, asDebug bool) grpc.StreamServerInterceptor

StreamServerInterceptor returns a new streaming server interceptor that logs request/response.

func ToPBStruct added in v0.1.5

func ToPBStruct(v map[string]interface{}) *types.Struct

ToPBStruct converts a map[string]interface{} to a types.Struct

func ToValue added in v0.1.5

func ToValue(v interface{}) *types.Value

ToValue converts an interface{} to a types.Value

func UnaryClientInterceptor added in v0.0.3

func UnaryClientInterceptor(l log.Logger, asDebug bool) grpc.UnaryClientInterceptor

UnaryClientInterceptor returns a new unary client interceptor that logs the execution of external gRPC calls.

func UnaryServerInterceptor added in v0.0.3

func UnaryServerInterceptor(l log.Logger, asDebug bool) grpc.UnaryServerInterceptor

UnaryServerInterceptor returns a new unary server interceptors that logs request/response.

Types

This section is empty.

Source Files

  • helper.go
  • logger.go
  • proxy.go
  • struct.go

Jump to

Keyboard shortcuts

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