grpchelper

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2018 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BalanceDial

func BalanceDial(credPath, credDesc string, c coordinator.Coordinator, service string, tag string, log *logger.Logger) (*grpc.ClientConn, error)

BalanceDial returns a client that dialed

func UnaryServerChan

func UnaryServerChan(interceptors ...grpc.UnaryServerInterceptor) grpc.UnaryServerInterceptor

UnaryServerChan returns a UnaryServerInterceptor

Types

type CommonUnaryServerInterceptor

type CommonUnaryServerInterceptor struct {
	// contains filtered or unexported fields
}

CommonUnaryServerInterceptor describe a server interceptor

func NewCommonUnaryServerInterceptor

func NewCommonUnaryServerInterceptor(log *logger.Logger) *CommonUnaryServerInterceptor

NewCommonUnaryServerInterceptor returns a CommonUnaryServerInterceptor

func (*CommonUnaryServerInterceptor) RecoverInterceptor

func (i *CommonUnaryServerInterceptor) RecoverInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp interface{}, err error)

RecoverInterceptor can recover a panic

func (*CommonUnaryServerInterceptor) TraceInterceptor

func (i *CommonUnaryServerInterceptor) TraceInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp interface{}, err error)

TraceInterceptor trace common info

Jump to

Keyboard shortcuts

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