Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CallbackMock ¶
CallbackMock is used for testing Task
func (*CallbackMock) CallNoArgs ¶
func (m *CallbackMock) CallNoArgs()
CallNoArgs is a dummy function which accepts no arguments
func (*CallbackMock) CallWithArgs ¶
func (m *CallbackMock) CallWithArgs(arg1 string, arg2 bool)
CallWithArgs is a dummy function which accepts two arguments
func (*CallbackMock) CallWithChan ¶
func (m *CallbackMock) CallWithChan(channel chan bool)
CallWithChan is a dummy function to test failure with non-hashable parameters
type FunctionMeta ¶
type FunctionMeta struct {
Name string
}
FunctionMeta holds information about function such as name and parameters.
func Translate ¶
func Translate(function Function) (FunctionMeta, error)
type Schedule ¶
type Schedule struct { IsRecurring bool LastRun time.Time NextRun time.Time Duration time.Duration }
Schedule holds information about the execution times of a specific task
type Task ¶
type Task struct { Schedule Func FunctionMeta Params []string FuncManager config.FunctionManager }
Task holds information about task
func New ¶
func New(function FunctionMeta, params []string, funcManager config.FunctionManager) *Task
New returns an instance of task
func NewWithSchedule ¶
func NewWithSchedule(function FunctionMeta, params []string, schedule Schedule, funcManager config.FunctionManager) *Task
NewWithSchedule creates an instance of task with the provided schedule information
func (*Task) ScheduleNextRun ¶
func (task *Task) ScheduleNextRun()
Click to show internal directories.
Click to hide internal directories.