context

package
v0.0.0-...-d1245af Latest Latest
Warning

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

Go to latest
Published: May 28, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const GlobalName = "@@GlobalContextName"

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

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

Context walks through all the functions.

func New

func New(env string, timeout time.Duration) *Context

Return root context and share its variables.

func (*Context) Cancel

func (ctx *Context) Cancel()

Cancel image handling.

func (*Context) Canceled

func (ctx *Context) Canceled() bool

Context has been canceled for timed out or deadline exceeded

func (*Context) Deadline

func (ctx *Context) Deadline() (time.Time, bool)

Return context deadline.

func (*Context) Done

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

Wait for cancelation

func (*Context) Env

func (ctx *Context) Env() string

Return current env

func (*Context) HTTP

func (ctx *Context) HTTP() *gin.Context

Return *gin.Context.

func (*Context) ID

func (ctx *Context) ID() string

Return context id

func (*Context) New

func (ctx *Context) New(httpCtx *gin.Context) *Context

Return sub context with *gin.Context.

Jump to

Keyboard shortcuts

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