context

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FuncContext

type FuncContext struct {
	//函数名
	FuncName string
	//文件名
	FileName string
	//代码行
	Line int
	// contains filtered or unexported fields
}

func GetFuncContext

func GetFuncContext(skip int) *FuncContext

GetFuncContext 查找函数执行上下文信息 param skip 忽略函数调用栈层次 return 文件名,代码行数,函数名

type RequestContext

type RequestContext struct {
	//接口名
	Method string
	//来源ip
	ClientIp string
	//来源服务
	FromServer string
	//traceId
	TraceId string
	//用户身份
	User string
	//日志标签
	LogTags map[string]string
}

Jump to

Keyboard shortcuts

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