Documentation
¶
Index ¶
- type Context
- func (c *Context) AddWarning(msg string)
- func (c *Context) AttachContext(parentCtx context.Context)
- func (c *Context) ConfigKeys() []string
- func (c *Context) ConfigValue(key string) (string, bool)
- func (c *Context) Done() <-chan struct{}
- func (c *Context) IsDone() bool
- func (c *Context) Load(key string) (interface{}, bool)
- func (c *Context) LoadTo(key string, dest interface{}) error
- func (c *Context) Logger() logrus.FieldLogger
- func (c *Context) RawConfig() []byte
- func (c *Context) RawContext() context.Context
- func (c *Context) ReleaseContext()
- func (c *Context) ResetWarnings()
- func (c *Context) Store(key string, obj interface{})
- func (c *Context) Warnings(clear bool) []types.Warning
- type ContextManager
- func (cm *ContextManager) AcquireTask(id string) bool
- func (cm *ContextManager) DefineExampleConfig(cfg string) error
- func (cm *ContextManager) DefineInstancesLimit(limit int) error
- func (cm *ContextManager) DefineTasksPerInstanceLimit(limit int) error
- func (cm *ContextManager) MarkTaskAsCompleted(id string)
- func (cm *ContextManager) ReleaseTask(id string)
- func (cm *ContextManager) TaskContext(id string) context.Context
- type Warning
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
func NewContext ¶
func (*Context) AddWarning ¶
func (*Context) AttachContext ¶
func (*Context) ConfigKeys ¶
func (*Context) Logger ¶
func (c *Context) Logger() logrus.FieldLogger
func (*Context) RawContext ¶ added in v2.0.8
func (*Context) ReleaseContext ¶
func (c *Context) ReleaseContext()
func (*Context) ResetWarnings ¶
func (c *Context) ResetWarnings()
type ContextManager ¶
type ContextManager struct {
TasksLimit int
InstancesLimit int
ExampleConfig yaml.Node // example config
// contains filtered or unexported fields
}
func NewContextManager ¶
func NewContextManager() *ContextManager
func (*ContextManager) AcquireTask ¶
func (cm *ContextManager) AcquireTask(id string) bool
func (*ContextManager) DefineExampleConfig ¶ added in v2.1.0
func (cm *ContextManager) DefineExampleConfig(cfg string) error
func (*ContextManager) DefineInstancesLimit ¶
func (cm *ContextManager) DefineInstancesLimit(limit int) error
func (*ContextManager) DefineTasksPerInstanceLimit ¶
func (cm *ContextManager) DefineTasksPerInstanceLimit(limit int) error
func (*ContextManager) MarkTaskAsCompleted ¶
func (cm *ContextManager) MarkTaskAsCompleted(id string)
func (*ContextManager) ReleaseTask ¶
func (cm *ContextManager) ReleaseTask(id string)
func (*ContextManager) TaskContext ¶
func (cm *ContextManager) TaskContext(id string) context.Context
Click to show internal directories.
Click to hide internal directories.