cbcli

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TaskNotFound = errors.New("task not found")

Functions

This section is empty.

Types

type ErrorHandler

type ErrorHandler interface {
	Error(e error)
}

type Logger

type Logger interface {
	InfoF(category string, message string, args ...interface{})
}

type Task

type Task interface {
	GetSchedule() string
	GetGroup() string
	GetName() string
	Run() error
}

type TaskContainer

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

func New

func New() *TaskContainer

func (*TaskContainer) AddTask

func (t *TaskContainer) AddTask(task Task)

func (*TaskContainer) DispatchTasks

func (t *TaskContainer) DispatchTasks()

func (*TaskContainer) Execute

func (t *TaskContainer) Execute() error

func (*TaskContainer) RunTask

func (t *TaskContainer) RunTask(group, name string) error

func (*TaskContainer) SetErrorHandler

func (t *TaskContainer) SetErrorHandler(handler ErrorHandler)

func (*TaskContainer) SetLogger

func (t *TaskContainer) SetLogger(logger Logger)

Jump to

Keyboard shortcuts

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