Documentation ¶
Index ¶
- func GetRawConfig(config interface{}) *helper.RawMessage
- func NewServicesProvider(clientPool *clients.ClientPool, walletManager *wallet.Manager, ...) types.TaskServices
- type TaskScheduler
- func (ts *TaskScheduler) AddCleanupTask(options *types.TaskOptions) (types.Task, error)
- func (ts *TaskScheduler) AddRootTask(options *types.TaskOptions) (types.Task, error)
- func (ts *TaskScheduler) ExecuteTask(ctx context.Context, task types.Task, ...) error
- func (ts *TaskScheduler) GetAllCleanupTasks() []types.Task
- func (ts *TaskScheduler) GetAllTasks() []types.Task
- func (ts *TaskScheduler) GetRootCleanupTasks() []types.Task
- func (ts *TaskScheduler) GetRootTasks() []types.Task
- func (ts *TaskScheduler) GetServices() types.TaskServices
- func (ts *TaskScheduler) GetTaskCount() int
- func (ts *TaskScheduler) GetTaskResultUpdateChan(task types.Task, oldResult types.TaskResult) <-chan bool
- func (ts *TaskScheduler) GetTaskStatus(task types.Task) *types.TaskStatus
- func (ts *TaskScheduler) ParseTaskOptions(rawtask *helper.RawMessage) (*types.TaskOptions, error)
- func (ts *TaskScheduler) RunTasks(ctx context.Context, timeout time.Duration) error
- func (ts *TaskScheduler) WatchTaskPass(ctx context.Context, cancelFn context.CancelFunc, task types.Task)
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) WatchTaskPass ¶
func (ts *TaskScheduler) WatchTaskPass(ctx context.Context, cancelFn context.CancelFunc, task types.Task)
Click to show internal directories.
Click to hide internal directories.