catutil

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CatCtx               = "cat_ctx"
	CatCtxRootTran       = "cat_root_tran"
	CatCtxRedisTran      = "cat_redis_tran"
	CatCtxMysqlTran      = "cat_mysql_tran"
	CatCtxMongoDbTran    = "cat_mongo_db_tran"
	CatCtxHttpRemoteTran = "cat_http_remote_tran"

	TypeHttpRemote    = "HttpRemoteCall"
	TypeMongoDbPrefix = "MongoDb."
	TypeUrlStatus     = "URL.status"

	RemoteCallMethod    = "RemoteCall.Method"
	RemoteCallErr       = "RemoteCall.Err"
	RemoteCallStatus    = "RemoteCall.Status"
	RemoteCallScheme    = "RemoteCall.Scheme"
	TraceIdHeaderName   = "x-trace-id"
	ContextKeyRequestId = "requestId"
	ContextKeyTraceId   = "traceId"
	ContextKeyStartTime = "startTime"
)

Variables

This section is empty.

Functions

func GetRequestId

func GetRequestId(c context.Context) string

func GetRootTran

func GetRootTran(ctx context.Context) message.Transactor

func GetTraceId

func GetTraceId(ctx context.Context) string

func SetRequestId

func SetRequestId(c context.Context, requestId string)

func SetTraceId

func SetTraceId(c *gin.Context, tran message.Transactor)

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