grpc_interceptor

package
v1.5.11 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2021 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewStreamWrapper added in v1.5.11

func NewStreamWrapper(ctx context.Context,
	accessLogger, errLogger log.LoggerContextIface,
	ss grpc.ServerStream,
	info *grpc.StreamServerInfo,
	requestMeta *rpc_helper.RequestMeta,
	debug bool) *streamWrapper

func StreamCtxHandleGRPC

func StreamCtxHandleGRPC() grpc.StreamClientInterceptor

func UnaryCtxHandleGRPC

func UnaryCtxHandleGRPC() grpc.UnaryClientInterceptor

Types

type AppServerInterceptor added in v1.5.11

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

func NewAppServerInterceptor added in v1.5.11

func NewAppServerInterceptor(debug bool, accessLogger, errLogger log.LoggerContextIface) *AppServerInterceptor

func (*AppServerInterceptor) Logger added in v1.5.11

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

Logger add app info in ctx.

func (*AppServerInterceptor) Metadata added in v1.5.11

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

func (*AppServerInterceptor) Recovery added in v1.5.11

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

Recovery recovers GRPC panic.

func (*AppServerInterceptor) RecoveryStream added in v1.5.11

func (i *AppServerInterceptor) RecoveryStream(srv interface{}, ss grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler) error

RecoveryStream is experimental function

func (*AppServerInterceptor) StreamLogger added in v1.5.11

func (i *AppServerInterceptor) StreamLogger(srv interface{}, ss grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler) error

StreamLogger is experimental function

func (*AppServerInterceptor) StreamMetadata added in v1.5.11

func (i *AppServerInterceptor) StreamMetadata(srv interface{}, ss grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler) error

Jump to

Keyboard shortcuts

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