trace

package module
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2024 License: MIT Imports: 4 Imported by: 0

README

trace

链路追踪

如何使用?

通过go get获取:

go get github.com/ZYallers/golib/trace

Documentation

Index

Constants

View Source
const IdKey = "Trace-Id"

Variables

This section is empty.

Functions

func DelTraceId

func DelTraceId(key string)

func GetTraceId

func GetTraceId(key string) string

func Go

func Go(f func())

func HasTraceId added in v0.0.2

func HasTraceId(key string) bool

func NewFastCache added in v0.0.2

func NewFastCache(maxBytes int) *fastCache

func NewFreeCache added in v0.0.2

func NewFreeCache(maxBytes int) *freeCache

func NewTraceId added in v0.0.2

func NewTraceId() string

func SetCache added in v0.0.2

func SetCache(c Cache)

func SetTraceId

func SetTraceId(key string, value string)

Types

type Cache added in v0.0.2

type Cache interface {
	Set(k, v []byte)
	Get([]byte) []byte
	Exist([]byte) bool
	Del([]byte)
	Clear()
}

func GetCache

func GetCache() Cache

Jump to

Keyboard shortcuts

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