scheduler

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2024 License: GPL-3.0 Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRawConfig

func GetRawConfig(config interface{}) *helper.RawMessage

func NewServicesProvider

func NewServicesProvider(clientPool *clients.ClientPool, walletManager *wallet.Manager, validatorNames *names.ValidatorNames) types.TaskServices

Types

type TaskScheduler

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

func NewTaskScheduler

func NewTaskScheduler(log logrus.FieldLogger, services types.TaskServices, variables types.Variables) *TaskScheduler

func (*TaskScheduler) AddCleanupTask

func (ts *TaskScheduler) AddCleanupTask(options *types.TaskOptions) (types.Task, error)

func (*TaskScheduler) AddRootTask

func (ts *TaskScheduler) AddRootTask(options *types.TaskOptions) (types.Task, error)

func (*TaskScheduler) ExecuteTask

func (ts *TaskScheduler) ExecuteTask(ctx context.Context, task types.Task, taskWatchFn func(ctx context.Context, cancelFn context.CancelFunc, task types.Task)) error

ExecuteTask executes a task this function blocks until the task is executed or the context cancelled

func (*TaskScheduler) GetAllCleanupTasks

func (ts *TaskScheduler) GetAllCleanupTasks() []types.Task

func (*TaskScheduler) GetAllTasks

func (ts *TaskScheduler) GetAllTasks() []types.Task

func (*TaskScheduler) GetRootCleanupTasks

func (ts *TaskScheduler) GetRootCleanupTasks() []types.Task

func (*TaskScheduler) GetRootTasks

func (ts *TaskScheduler) GetRootTasks() []types.Task

func (*TaskScheduler) GetServices

func (ts *TaskScheduler) GetServices() types.TaskServices

func (*TaskScheduler) GetTaskCount

func (ts *TaskScheduler) GetTaskCount() int

func (*TaskScheduler) GetTaskResultUpdateChan

func (ts *TaskScheduler) GetTaskResultUpdateChan(task types.Task, oldResult types.TaskResult) <-chan bool

func (*TaskScheduler) GetTaskStatus

func (ts *TaskScheduler) GetTaskStatus(task types.Task) *types.TaskStatus

func (*TaskScheduler) ParseTaskOptions

func (ts *TaskScheduler) ParseTaskOptions(rawtask *helper.RawMessage) (*types.TaskOptions, error)

func (*TaskScheduler) RunTasks

func (ts *TaskScheduler) RunTasks(ctx context.Context, timeout time.Duration) error

func (*TaskScheduler) WatchTaskPass

func (ts *TaskScheduler) WatchTaskPass(ctx context.Context, cancelFn context.CancelFunc, task types.Task)

Jump to

Keyboard shortcuts

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