context

package
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2018 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrCtxTimeout = errors.New("fbase context timeout")

ErrCtxTimeout timeout

Functions

func PutContext

func PutContext(ctx *TimerCtx)

Types

type TimerCtx

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

func GetContext

func GetContext() *TimerCtx

func NewTimerCtx

func NewTimerCtx(timeout time.Duration) *TimerCtx

func (*TimerCtx) Close

func (cc *TimerCtx) Close()

func (*TimerCtx) Deadline

func (cc *TimerCtx) Deadline() (deadline time.Time, ok bool)

func (*TimerCtx) Done

func (cc *TimerCtx) Done() <-chan struct{}

func (*TimerCtx) Err

func (cc *TimerCtx) Err() error

func (*TimerCtx) Reset

func (cc *TimerCtx) Reset(timeout time.Duration)

func (*TimerCtx) Value

func (cc *TimerCtx) Value(key interface{}) interface{}

Jump to

Keyboard shortcuts

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