Documentation
¶
Index ¶
- Constants
- func BizIdFromContext(ctx context.Context) (uint64, bool)
- func BizKeyFromContext(ctx context.Context) (string, bool)
- func GroupFromContext(ctx context.Context) (string, bool)
- func ReqTypeFromContext(ctx context.Context) (uint8, bool)
- func WithBizId(ctx context.Context, bizId uint64) context.Context
- func WithBizKey(ctx context.Context, bizKey string) context.Context
- func WithGroup(ctx context.Context, group string) context.Context
- func WithReqType(ctx context.Context, reqType uint8) context.Context
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 ¶
BizIdFromContext 从 context.Context 获取 business id
func BizKeyFromContext ¶
BizKeyFromContext 从 context.Context 获取 business key
func ReqTypeFromContext ¶
ReqTypeFromContext 从 context.Context 获取 request type
func WithBizKey ¶
WithBizKey 在 context.Context 写入 business key
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.