Documentation ¶
Index ¶
- Constants
- func CheckErr(err error)
- func DisableThroughLogFilter(ctx context.Context) context.Context
- func ExtractCallThroughMethod(ctx context.Context) string
- func ExtractRequestAttr(ctx context.Context, key string) (value string, ok bool)
- func ExtractServiceMethod(ctx context.Context) string
- func FlatMap2Array(params map[string]interface{}) []interface{}
- func InjectCallThroughMethod(ctx context.Context, serviceMethod string) context.Context
- func InjectRequestAttr(ctx context.Context, key string, value string) context.Context
- func InjectServiceMethod(ctx context.Context, serviceMethod string) context.Context
- func List2Markdown(list []interface{}, ignoreTableHeaders ...bool) string
- func NewContext(ctx context.Context) context.Context
- func PrintPanicStack()
- func RandomInt() int
- func RandomInt32() int32
- func RandomInt64() int64
- func RandomUint() uint
- func RandomUint32() uint32
- func RandomUint64() uint64
Constants ¶
View Source
const INT32_MAX int32 = 1<<31 - 1
View Source
const INT32_MIN int32 = int32(0)
View Source
const INT64_MAX int64 = 1<<63 - 1
View Source
const INT64_MIN int64 = int64(0)
View Source
const INT_MAX = 1<<63 - 1
View Source
const INT_MIN int = 0
View Source
const UINT32_MAX uint32 = 1<<32 - 1
View Source
const UINT32_MIN uint32 = uint32(0)
View Source
const UINT64_MAX uint64 = 1<<64 - 1
View Source
const UINT64_MIN uint64 = uint64(0)
View Source
const UINT_MAX uint = ^uint(0)
View Source
const UINT_MIN uint = 0
Variables ¶
This section is empty.
Functions ¶
func DisableThroughLogFilter ¶
DisableThroughLogFilter 将LogFilterTag设置到context中,用于跨服务传递
func ExtractCallThroughMethod ¶
ExtractCallThroughMethod ctx获取到上游接口名
func ExtractRequestAttr ¶
ExtractRequestAttr 将context中的metadata中的key-value提取出来
func ExtractServiceMethod ¶
ExtractServiceMethod ctx获取到上游接口名
func FlatMap2Array ¶
func FlatMap2Array(params map[string]interface{}) []interface{}
FlatMap2Array 将map转化为key-value数组
func InjectCallThroughMethod ¶
InjectCallThroughMethod 将接口名注入到ctx,方面从下游能从ctx获取到上游接口名
func InjectRequestAttr ¶
InjectRequestAttr 将key-value注入到context中的metadata中,一般用于请求链路上下文传递
func InjectServiceMethod ¶
InjectServiceMethod 将接口名注入到ctx,方便从下游能从ctx获取到上游接口名
func List2Markdown ¶
func NewContext ¶
NewContext 将context中的metadata中的key-value提取出来
func PrintPanicStack ¶
func PrintPanicStack()
func RandomInt32 ¶
func RandomInt32() int32
func RandomInt64 ¶
func RandomInt64() int64
func RandomUint ¶
func RandomUint() uint
func RandomUint32 ¶
func RandomUint32() uint32
func RandomUint64 ¶
func RandomUint64() uint64
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.