grpc_interceptor

package
v1.4.6 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2021 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StreamCtxHandleGRPC

func StreamCtxHandleGRPC() grpc.StreamClientInterceptor

func UnaryCtxHandleGRPC

func UnaryCtxHandleGRPC() grpc.UnaryClientInterceptor

Types

type AppInterceptor

type AppInterceptor struct {
	App *kelvins.GRPCApplication
}

AppInterceptor ...

func (*AppInterceptor) AppGRPC

func (i *AppInterceptor) AppGRPC(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)

AppGRPC add app info in ctx.

func (*AppInterceptor) ErrorCodeGRPC

func (i *AppInterceptor) ErrorCodeGRPC(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)

func (*AppInterceptor) LoggingGRPC

func (i *AppInterceptor) LoggingGRPC(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)

loggingGRPC logs GRPC request.

func (*AppInterceptor) RecoveryGRPC

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

RecoveryGRPC recovers GRPC panic.

Jump to

Keyboard shortcuts

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