client

package
v0.0.0-...-770e577 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AttrWeight      = "attr_weight"
	AttrReadWeight  = "attr_read_weight"
	AttrWriteWeight = "attr_write_weight"
	AttrGroup       = "attr_group"
	AttrNode        = "attr_node"
)

Variables

This section is empty.

Functions

func BizIdFromContext

func BizIdFromContext(ctx context.Context) (uint64, bool)

BizIdFromContext 从 context.Context 获取 business id

func BizKeyFromContext

func BizKeyFromContext(ctx context.Context) (string, bool)

BizKeyFromContext 从 context.Context 获取 business key

func GroupFromContext

func GroupFromContext(ctx context.Context) (string, bool)

func ReqTypeFromContext

func ReqTypeFromContext(ctx context.Context) (uint8, bool)

ReqTypeFromContext 从 context.Context 获取 request type

func WithBizId

func WithBizId(ctx context.Context, bizId uint64) context.Context

WithBizId 在 context.Context 内写入 business id

func WithBizKey

func WithBizKey(ctx context.Context, bizKey string) context.Context

WithBizKey 在 context.Context 写入 business key

func WithGroup

func WithGroup(ctx context.Context, group string) context.Context

WithGroup 在 context.Context 内写入 group 信息

func WithReqType

func WithReqType(ctx context.Context, reqType uint8) context.Context

WithReqType 在 context.Context 内写入 request type 信息 read request = 0 write request = 1

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