Documentation ¶
Index ¶
- Constants
- Variables
- func FuncDisableInterceptor(fd *disabler.FuncDisabler) grpc.UnaryServerInterceptor
- func FuncDisableStreamInterceptor(fd *disabler.FuncDisabler) grpc.StreamServerInterceptor
- func JWTClientInterceptor(ctx context.Context, method string, req, reply any, cc *grpc.ClientConn, ...) error
- func JWTInterceptor(ctx context.Context, req any, info *grpc.UnaryServerInfo, ...) (any, error)
- func JWTStreamClientInterceptor(ctx context.Context, desc *grpc.StreamDesc, cc *grpc.ClientConn, method string, ...) (grpc.ClientStream, error)
- func JWTStreamInterceptor(srv any, ss grpc.ServerStream, info *grpc.StreamServerInfo, ...) error
- func LogInterceptor(ctx context.Context, req any, info *grpc.UnaryServerInfo, ...) (any, error)
- func NoLog(ctx context.Context) context.Context
- func RecoverInterceptor(ctx context.Context, req any, info *grpc.UnaryServerInfo, ...) (resp any, err error)
- func RecoverStreamInterceptor(srv any, ss grpc.ServerStream, info *grpc.StreamServerInfo, ...) (err error)
Constants ¶
View Source
const ( // NoLogKey 忽略请求响应日志打印 key NoLogKey = "X-No-Log" // NoLogFlag 忽略请求响应日志打印 flag NoLogFlag = "true" )
Variables ¶
View Source
var ErrRPCNotAllowed = bizerr.ErrRPCNotAllowed
ErrRPCNotAllowed 暂不支持该 RPC 错误
Functions ¶
func FuncDisableInterceptor ¶
func FuncDisableInterceptor(fd *disabler.FuncDisabler) grpc.UnaryServerInterceptor
FuncDisableInterceptor 功能禁用服务端一元拦截器
func FuncDisableStreamInterceptor ¶
func FuncDisableStreamInterceptor(fd *disabler.FuncDisabler) grpc.StreamServerInterceptor
FuncDisableStreamInterceptor 功能禁用服务端流拦截器
func JWTClientInterceptor ¶
func JWTClientInterceptor(ctx context.Context, method string, req, reply any, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption) error
JWTClientInterceptor JWT 客户端一元拦截器
func JWTInterceptor ¶
func JWTInterceptor(ctx context.Context, req any, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (any, error)
JWTInterceptor JWT 服务端一元拦截器
func JWTStreamClientInterceptor ¶
func JWTStreamClientInterceptor(ctx context.Context, desc *grpc.StreamDesc, cc *grpc.ClientConn, method string, streamer grpc.Streamer, opts ...grpc.CallOption) (grpc.ClientStream, error)
JWTStreamClientInterceptor JWT 客户端流拦截器
func JWTStreamInterceptor ¶
func JWTStreamInterceptor(srv any, ss grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler) error
JWTStreamInterceptor JWT 服务端流拦截器
func LogInterceptor ¶
func LogInterceptor(ctx context.Context, req any, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (any, error)
LogInterceptor 请求响应日志打印服务端一元拦截器
func RecoverInterceptor ¶
func RecoverInterceptor(ctx context.Context, req any, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp any, err error)
RecoverInterceptor 恐慌捕获恢复服务端一元拦截器
func RecoverStreamInterceptor ¶
func RecoverStreamInterceptor(srv any, ss grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler) (err error)
RecoverStreamInterceptor 恐慌捕获恢复服务端流拦截器
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.