Documentation ¶
Index ¶
- func BalanceDial(credPath, credDesc string, c coordinator.Coordinator, service string, ...) (*grpc.ClientConn, error)
- func UnaryServerChan(interceptors ...grpc.UnaryServerInterceptor) grpc.UnaryServerInterceptor
- type CommonUnaryServerInterceptor
- func (i *CommonUnaryServerInterceptor) RecoverInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, ...) (resp interface{}, err error)
- func (i *CommonUnaryServerInterceptor) TraceInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, ...) (resp interface{}, err error)
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
Click to show internal directories.
Click to hide internal directories.