impl

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: May 17, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDefaultContext added in v1.7.0

func NewDefaultContext(sysCtx context.Context) job.Context

NewDefaultContext is constructor of building DefaultContext

Types

type Context

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

Context ...

func NewContext

func NewContext(sysCtx context.Context, cfgMgr *comcfg.CfgManager) *Context

NewContext ...

func (*Context) Build

func (c *Context) Build(tracker job.Tracker) (job.Context, error)

Build implements the same method in env.JobContext interface This func will build the job execution context before running

func (*Context) Checkin

func (c *Context) Checkin(status string) error

Checkin is bridge func for reporting detailed status

func (*Context) Get

func (c *Context) Get(prop string) (interface{}, bool)

Get implements the same method in env.JobContext interface

func (*Context) GetLogger

func (c *Context) GetLogger() logger.Interface

GetLogger returns the logger

func (*Context) Init

func (c *Context) Init() error

Init ...

func (*Context) OPCommand

func (c *Context) OPCommand() (job.OPCommand, bool)

OPCommand return the control operational command like stop/cancel if have

func (*Context) SystemContext

func (c *Context) SystemContext() context.Context

SystemContext implements the same method in env.JobContext interface

func (*Context) Tracker added in v1.8.0

func (c *Context) Tracker() job.Tracker

Tracker returns the job tracker attached with the context

type DefaultContext added in v1.7.0

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

DefaultContext provides a basic job context

func (*DefaultContext) Build added in v1.7.0

func (dc *DefaultContext) Build(t job.Tracker) (job.Context, error)

Build implements the same method in env.Context interface This func will build the job execution context before running

func (*DefaultContext) Checkin added in v1.7.0

func (dc *DefaultContext) Checkin(status string) error

Checkin is bridge func for reporting detailed status

func (*DefaultContext) Get added in v1.7.0

func (dc *DefaultContext) Get(prop string) (interface{}, bool)

Get implements the same method in env.Context interface

func (*DefaultContext) GetLogger added in v1.7.0

func (dc *DefaultContext) GetLogger() logger.Interface

GetLogger returns the logger

func (*DefaultContext) OPCommand added in v1.7.0

func (dc *DefaultContext) OPCommand() (job.OPCommand, bool)

OPCommand return the control operational command like stop if have

func (*DefaultContext) SystemContext added in v1.7.0

func (dc *DefaultContext) SystemContext() context.Context

SystemContext implements the same method in env.Context interface

func (*DefaultContext) Tracker added in v1.8.0

func (dc *DefaultContext) Tracker() job.Tracker

Tracker returns the tracker tracking the job attached with the context

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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