Documentation ¶
Index ¶
- Constants
- func GetCtxFlowColor(ctx context.Context) *string
- func GetLocalFlowColor() *string
- func GrpcClientUnary(ctx context.Context, method string, req, reply any, cc *grpc.ClientConn, ...) error
- func GrpcServerUnary(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, ...) (interface{}, error)
- func HttpClientMiddleware(c *gclient.Client, r *http.Request) (response *gclient.Response, err error)
- func HttpServerMiddleware(r *ghttp.Request)
- func IsBase() *bool
- func IsOpen() bool
- func SetCtxFlowColor(ctx context.Context, defaultColor string) context.Context
Constants ¶
View Source
const ColorBase = "base"
View Source
const FlowColor = "FLOW_COLOR"
Variables ¶
This section is empty.
Functions ¶
func GetCtxFlowColor ¶
func GetLocalFlowColor ¶
func GetLocalFlowColor() *string
func GrpcClientUnary ¶
func GrpcClientUnary(ctx context.Context, method string, req, reply any, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption) error
GrpcClientUnary grpc客户端流量染色拦截器
func GrpcServerUnary ¶
func GrpcServerUnary( ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler, ) (interface{}, error)
GrpcServerUnary grpc服务端流量染色拦截器
func HttpClientMiddleware ¶
func HttpClientMiddleware(c *gclient.Client, r *http.Request) (response *gclient.Response, err error)
HttpClientMiddleware http客户端流量染色中间件
func HttpServerMiddleware ¶
HttpServerMiddleware http服务端流量染色中间件
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.