halo

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 19, 2024 License: MIT Imports: 8 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetGoID

func GetGoID() int64

GetGoID 返回协程ID

func Recover

func Recover()

func RecoverFunc

func RecoverFunc(fn func(string))

func Stack

func Stack(skip int) []byte

Stack returns a nicely formatted stack frame, skipping skip frames.

Types

type Context

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

func NewContext

func NewContext(ctx context.Context) *Context

func WithValue

func WithValue(parent context.Context, key, val any) *Context

func (*Context) Deadline

func (c *Context) Deadline() (deadline time.Time, ok bool)

func (*Context) Done

func (c *Context) Done() <-chan struct{}

func (*Context) Err

func (c *Context) Err() error

func (*Context) Set

func (c *Context) Set(key, val any)

func (*Context) Value

func (c *Context) Value(key any) any

Jump to

Keyboard shortcuts

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