context

package
v0.0.0-...-383e6fc Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2020 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	WG sync.WaitGroup

	FS            afero.Fs
	Cfg           *types.DRLMCoreConfig
	DB            *gorm.DB
	MinioCli      *minio.Client
	MinioAdminCli *madmin.AdminClient
	// contains filtered or unexported fields
}

Context has the "global" values of the app (such as the config, the DB connection...). It also implements context.Context

func Background

func Background() *Context

Background creates a new context with context.Background as the inner context

func TODO

func TODO() *Context

TODO creates a new context with context.TODO as the inner context

func WithCancel

func WithCancel() (*Context, context.CancelFunc)

WithCancel creates a new context with context.WithCancel as the inner context

func (*Context) Deadline

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

Deadline implements context.Context.Deadline

func (*Context) Done

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

Done implements context.Context.Done

func (*Context) Err

func (ctx *Context) Err() error

Err implements context.Context.Err

func (*Context) Value

func (ctx *Context) Value(key interface{}) interface{}

Value implements context.Context.Value

Jump to

Keyboard shortcuts

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