flowColor

package
v0.0.0-...-370319b Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const ColorBase = "base"
View Source
const FlowColor = "FLOW_COLOR"

Variables

This section is empty.

Functions

func GetCtxFlowColor

func GetCtxFlowColor(ctx context.Context) *string

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

func HttpServerMiddleware(r *ghttp.Request)

HttpServerMiddleware http服务端流量染色中间件

func IsBase

func IsBase() *bool

func IsOpen

func IsOpen() bool

func SetCtxFlowColor

func SetCtxFlowColor(ctx context.Context, defaultColor string) context.Context

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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