Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TaskFunc ¶
type TaskFunc func(interface{}) (interface{}, error)
TaskFunc is the type of the task callback.
type TaskRepository ¶
type TaskRepository struct {
// contains filtered or unexported fields
}
TaskRepository is the in memory storage of tasks.
func NewTaskRepository ¶
func NewTaskRepository() *TaskRepository
NewTaskRepository creates and returns a new TaskRepository instance.
func (*TaskRepository) GetTaskFunc ¶
func (repo *TaskRepository) GetTaskFunc(name string) (TaskFunc, error)
GetTaskFunc returns the TaskFunc for a specified name if that exists in the repository.
func (*TaskRepository) GetTaskNames ¶
func (repo *TaskRepository) GetTaskNames() []string
GetTaskNames returns all the names of the tasks currently in the repository.
func (*TaskRepository) Register ¶
func (repo *TaskRepository) Register(name string, taskFunc TaskFunc)
Register registers a new task in the repository.
Click to show internal directories.
Click to hide internal directories.