middleware

package
v0.0.0-...-378a548 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GRPCStatusCodeKey = attribute.Key("rpc.grpc.status_code")
)

Variables

View Source
var (
	LogDir = "../log"
)

Functions

func InitLogger

func InitLogger() error

func StreamServerLogInterceptor

func StreamServerLogInterceptor(srv interface{}, stream grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler) (err error)

StreamServerRecoveryInterceptor recover

func StreamServerOpentraceInterceptor

func StreamServerOpentraceInterceptor(srv interface{}, stream grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler) (err error)

StreamServerRecoveryInterceptor recover

func StreamServerRecoveryInterceptor

func StreamServerRecoveryInterceptor(srv interface{}, stream grpc.ServerStream, _ *grpc.StreamServerInfo, handler grpc.StreamHandler) (err error)

StreamServerRecoveryInterceptor recover

func UnaryClientOpentraceInterceptor

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

func UnaryServerLogInterceptor

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

UnaryServerLogInterceptor log 拦截

func UnaryServerOpentraceInterceptor

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

UnaryServerRecoveryInterceptor recover

func UnaryServerRecoveryInterceptor

func UnaryServerRecoveryInterceptor(ctx context.Context, req interface{}, _ *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp interface{}, err error)

UnaryServerRecoveryInterceptor recover

Types

type StringAble

type StringAble interface {
	String() string
}

StringAble string

Jump to

Keyboard shortcuts

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