trace

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Trace 基于goroutine的编号,实现共享全局唯一ID,用于串联业务线的上下文

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GC added in v0.9.10

func GC()

func Get added in v0.9.10

func Get() string

func Go added in v1.0.0

func Go(fn func())

func Id added in v0.9.10

func Id() string

func Set added in v0.9.10

func Set(uuid string)

Types

type Trace added in v1.0.1

type Trace struct {
	// contains filtered or unexported fields
}

func NewTrace added in v1.0.1

func NewTrace() *Trace

func (*Trace) GC added in v1.0.1

func (t *Trace) GC()

GC 回收

func (*Trace) Get added in v1.0.1

func (t *Trace) Get() string

Get

func (*Trace) Go added in v1.0.1

func (t *Trace) Go(fn func())

Go 保持两个goroutine使用同一个traceId连通

func (*Trace) Set added in v1.0.1

func (t *Trace) Set(uuid string)

Set

Jump to

Keyboard shortcuts

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