taskrepo

package
v0.8.7 Latest Latest
Warning

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

Go to latest
Published: May 2, 2022 License: MIT Imports: 1 Imported by: 0

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 map[string]TaskFunc

TaskRepository is the in memory task repository.

func New

func New() *TaskRepository

New initializes 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 task repository.

func (TaskRepository) GetTaskNames

func (repo TaskRepository) GetTaskNames() []string

GetTaskNames returns all the names of the tasks currently in the task repository.

func (TaskRepository) Register

func (repo TaskRepository) Register(name string, taskFunc TaskFunc)

Register adds a new task in the repository.

Jump to

Keyboard shortcuts

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