context

package
v0.0.0-...-831d175 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2019 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromTraceID

func FromTraceID(ctx context.Context) (string, bool)

FromTraceID 从上下文中获取追踪ID

func FromTrans

func FromTrans(ctx context.Context) (interface{}, bool)

FromTrans 从上下文中获取事务

func FromUserID

func FromUserID(ctx context.Context) (string, bool)

FromUserID 从上下文中获取用户ID

func NewTraceID

func NewTraceID(ctx context.Context, traceID string) context.Context

NewTraceID 创建追踪ID的上下文

func NewTrans

func NewTrans(ctx context.Context, trans interface{}) context.Context

NewTrans 创建事务的上下文

func NewUserID

func NewUserID(ctx context.Context, userID string) context.Context

NewUserID 创建用户ID的上下文

Types

This section is empty.

Jump to

Keyboard shortcuts

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