Documentation ¶
Index ¶
- func ClearTaskManager(localLog zerolog.Logger)
- func GetTaskManagerTime() time.Time
- func WithRecurringFunctionTaskInterval(interval time.Duration) func(*RecurringFunctionTask)
- func WithRecurringTaskInterval(interval time.Duration) GenericApplier[*RecurringTask]
- func WithRecurringTaskOffset(offset time.Duration) GenericApplier[*RecurringTask]
- func WithTaskTime(taskTime time.Time) GenericApplier[*Task]
- type InstallTaskOptions
- func WithInstallTaskOptionsDelta(delta time.Duration) InstallTaskOptions
- func WithInstallTaskOptionsInterval(interval time.Duration) InstallTaskOptions
- func WithInstallTaskOptionsNone() InstallTaskOptions
- func WithInstallTaskOptionsOffset(offset time.Duration) InstallTaskOptions
- func WithInstallTaskOptionsWhen(when time.Time) InstallTaskOptions
- func (i InstallTaskOptions) WithDelta(delta time.Duration) InstallTaskOptions
- func (i InstallTaskOptions) WithInterval(interval time.Duration) InstallTaskOptions
- func (i InstallTaskOptions) WithOffset(offset time.Duration) InstallTaskOptions
- func (i InstallTaskOptions) WithWhen(when time.Time) InstallTaskOptions
- type OneShotDeleteTask
- type OneShotFunctionTask
- type OneShotTask
- type RecurringFunctionTask
- type RecurringTask
- type Task
- func (t *Task) GetDebugAttr(attr string) any
- func (t *Task) GetIsScheduled() bool
- func (t *Task) GetLeafName() string
- func (t *Task) GetTaskTime() *time.Time
- func (t *Task) InstallTask(options InstallTaskOptions)
- func (t *Task) Resume()
- func (d *Task) Serialize() ([]byte, error)
- func (d *Task) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error
- func (t *Task) SetIsScheduled(isScheduled bool)
- func (d *Task) String() string
- func (t *Task) SuspendTask()
- type TaskManager
- type TaskRequirements
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClearTaskManager ¶
func GetTaskManagerTime ¶
func WithRecurringFunctionTaskInterval ¶
func WithRecurringFunctionTaskInterval(interval time.Duration) func(*RecurringFunctionTask)
func WithRecurringTaskInterval ¶
func WithRecurringTaskInterval(interval time.Duration) GenericApplier[*RecurringTask]
func WithRecurringTaskOffset ¶
func WithRecurringTaskOffset(offset time.Duration) GenericApplier[*RecurringTask]
func WithTaskTime ¶
Types ¶
type InstallTaskOptions ¶
type InstallTaskOptions struct { When *time.Time Delta *time.Duration Interval *time.Duration Offset *time.Duration }
func WithInstallTaskOptionsDelta ¶
func WithInstallTaskOptionsDelta(delta time.Duration) InstallTaskOptions
func WithInstallTaskOptionsInterval ¶
func WithInstallTaskOptionsInterval(interval time.Duration) InstallTaskOptions
func WithInstallTaskOptionsNone ¶
func WithInstallTaskOptionsNone() InstallTaskOptions
func WithInstallTaskOptionsOffset ¶
func WithInstallTaskOptionsOffset(offset time.Duration) InstallTaskOptions
func WithInstallTaskOptionsWhen ¶
func WithInstallTaskOptionsWhen(when time.Time) InstallTaskOptions
func (InstallTaskOptions) WithDelta ¶
func (i InstallTaskOptions) WithDelta(delta time.Duration) InstallTaskOptions
func (InstallTaskOptions) WithInterval ¶
func (i InstallTaskOptions) WithInterval(interval time.Duration) InstallTaskOptions
func (InstallTaskOptions) WithOffset ¶
func (i InstallTaskOptions) WithOffset(offset time.Duration) InstallTaskOptions
func (InstallTaskOptions) WithWhen ¶
func (i InstallTaskOptions) WithWhen(when time.Time) InstallTaskOptions
type OneShotDeleteTask ¶
type OneShotDeleteTask struct {
*Task
}
func NewOneShotDeleteTask ¶
func NewOneShotDeleteTask(taskRequirements TaskRequirements, options ...Option) *OneShotDeleteTask
func (*OneShotDeleteTask) IsOneShotDeleteTask ¶
func (r *OneShotDeleteTask) IsOneShotDeleteTask() bool
func (*OneShotDeleteTask) Serialize ¶
func (d *OneShotDeleteTask) Serialize() ([]byte, error)
func (*OneShotDeleteTask) SerializeWithWriteBuffer ¶
func (d *OneShotDeleteTask) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error
func (*OneShotDeleteTask) String ¶
func (d *OneShotDeleteTask) String() string
type OneShotFunctionTask ¶
type OneShotFunctionTask struct { *OneShotDeleteTask // contains filtered or unexported fields }
func FunctionTask ¶
func FunctionTask(fn GenericFunction, args Args, kwArgs KWArgs) *OneShotFunctionTask
func OneShotFunction ¶
func OneShotFunction(fn GenericFunction, args Args, kwArgs KWArgs) *OneShotFunctionTask
func (*OneShotFunctionTask) ProcessTask ¶
func (m *OneShotFunctionTask) ProcessTask() error
func (*OneShotFunctionTask) Serialize ¶
func (d *OneShotFunctionTask) Serialize() ([]byte, error)
func (*OneShotFunctionTask) SerializeWithWriteBuffer ¶
func (d *OneShotFunctionTask) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error
func (*OneShotFunctionTask) String ¶
func (d *OneShotFunctionTask) String() string
type OneShotTask ¶
type OneShotTask struct {
*Task
}
func NewOneShotTask ¶
func NewOneShotTask(taskRequirements TaskRequirements, options ...Option) *OneShotTask
func (*OneShotTask) Serialize ¶
func (d *OneShotTask) Serialize() ([]byte, error)
func (*OneShotTask) SerializeWithWriteBuffer ¶
func (d *OneShotTask) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error
func (*OneShotTask) String ¶
func (d *OneShotTask) String() string
type RecurringFunctionTask ¶
type RecurringFunctionTask struct { *RecurringTask // contains filtered or unexported fields }
func NewRecurringFunctionTask ¶
func NewRecurringFunctionTask(localLog zerolog.Logger, fn GenericFunction, args Args, kwArgs KWArgs, options ...Option) *RecurringFunctionTask
func (*RecurringFunctionTask) ProcessTask ¶
func (r *RecurringFunctionTask) ProcessTask() error
func (*RecurringFunctionTask) String ¶
func (r *RecurringFunctionTask) String() string
type RecurringTask ¶
type RecurringTask struct { *Task // contains filtered or unexported fields }
func NewRecurringTask ¶
func NewRecurringTask(localLog zerolog.Logger, taskRequirements TaskRequirements, options ...Option) *RecurringTask
func (*RecurringTask) GetDebugAttr ¶
func (r *RecurringTask) GetDebugAttr(attr string) any
func (*RecurringTask) InstallTask ¶
func (r *RecurringTask) InstallTask(options InstallTaskOptions)
func (*RecurringTask) IsRecurringTask ¶
func (r *RecurringTask) IsRecurringTask() bool
type Task ¶
type Task struct { *DebugContents `ignore:"true"` TaskRequirements `ignore:"true"` // contains filtered or unexported fields }
func NewTask ¶
func NewTask(taskRequirements TaskRequirements, options ...Option) *Task
func (*Task) GetDebugAttr ¶
func (*Task) GetIsScheduled ¶
func (*Task) GetLeafName ¶
func (*Task) GetTaskTime ¶
func (*Task) InstallTask ¶
func (t *Task) InstallTask(options InstallTaskOptions)
func (*Task) SerializeWithWriteBuffer ¶
func (*Task) SetIsScheduled ¶
func (*Task) SuspendTask ¶
func (t *Task) SuspendTask()
type TaskManager ¶
type TaskManager interface { fmt.Stringer GetTime() time.Time InstallTask(task TaskRequirements) SuspendTask(task TaskRequirements) ResumeTask(task TaskRequirements) GetNextTask() (TaskRequirements, *time.Duration) ProcessTask(task TaskRequirements) GetTasks() []TaskRequirements PopTask() TaskRequirements CountTasks() int ClearTasks() }
func GetTaskManager
deprecated
func GetTaskManager() TaskManager
Deprecated: should only be used by core... find a better way
func NewTaskManager ¶
func NewTaskManager(localLog zerolog.Logger) TaskManager
func OverwriteTaskManager ¶
func OverwriteTaskManager(localLog zerolog.Logger, manager TaskManager) (oldManager TaskManager)
type TaskRequirements ¶
Source Files ¶
- task.go
- task_OneShotDeleteTask.go
- task_OneShotDeleteTask_plc4xgen.go
- task_OneShotFunctionTask.go
- task_OneShotFunctionTask_plc4xgen.go
- task_OneShotTask.go
- task_OneShotTask_plc4xgen.go
- task_RecurringFunctionTask.go
- task_RecurringTask.go
- task_Task.go
- task_TaskManager.go
- task_Task_plc4xgen.go
- task_taskItem_plc4xgen.go
Click to show internal directories.
Click to hide internal directories.