scontext

package
v1.3.4 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2019 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ContextKeyTraceID = "traceID"
	ContextKeyControl = "Control"

	ContextKeyHead        = "Head"
	ContextKeyHeadUid     = "uid"
	ContextKeyHeadSource  = "source"
	ContextKeyHeadIp      = "ip"
	ContextKeyHeadRegion  = "region"
	ContextKeyHeadDt      = "dt"
	ContextKeyHeadUnionId = "unionid"
)

由于请求的上下文信息的 thrift 定义在 util 项目中,本模块主要为了避免循环依赖

Variables

This section is empty.

Functions

func GetGroup added in v1.2.0

func GetGroup(ctx context.Context) string

func GetGroupWithDefault added in v1.3.0

func GetGroupWithDefault(ctx context.Context, dv string) string

Types

type ContextController added in v1.2.0

type ContextController interface {
	GetGroup() string
}

type ContextHeader

type ContextHeader interface {
	ToKV() map[string]interface{}
}

Jump to

Keyboard shortcuts

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