Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckSchedule ¶
CheckSchedule returns true if the schedule string is compliant with cron
Types ¶
type CronFunction ¶
CronFunction depicts an OpenFaaS function which is invoked by cron
func ToCronFunction ¶
func ToCronFunction(f requests.Function, topic string) (CronFunction, error)
ToCronFunction converts a requests.Function object to the CronFunction and returns error if it is not possible
func (CronFunction) InvokeFunction ¶
func (c CronFunction) InvokeFunction(i *types.Invoker) (*[]byte, error)
InvokeFunction Invokes the cron function
type CronFunctionInterface ¶
CronFunctionInterface defines an interface to work with CronFunction during testing
type CronFunctions ¶
type CronFunctions []CronFunction
CronFunctions a list of CronFunction
func (*CronFunctions) Contains ¶
func (c *CronFunctions) Contains(cF *CronFunction) bool
Contains returns true if the provided CronFunction object is in list
type FunctionLookupBuilder ¶
type FunctionLookupBuilder types.FunctionLookupBuilder
FunctionLookupBuilder alias for types.FunctionLookupBuilder
func (*FunctionLookupBuilder) GetFunctions ¶
func (lookup *FunctionLookupBuilder) GetFunctions() ([]requests.Function, error)
GetFunctions requests the OpenFaaS gteway to return a list of all functions
type ScheduledFunction ¶
type ScheduledFunction struct { // Function is CronFunction object which is running Function CronFunction // Id is the entryid for the scheduled function ID EntryID }
ScheduledFunction is a CronFunction that has been scheduled to run
type ScheduledFunctions ¶
type ScheduledFunctions []ScheduledFunction
ScheduledFunctions is an array of ScheduledFunction
func (*ScheduledFunctions) Contains ¶
func (functions *ScheduledFunctions) Contains(cronFunc *CronFunction) bool
Contains returns true if the ScheduledFunctions array contains the CronFunction
type Scheduler ¶
type Scheduler struct {
// contains filtered or unexported fields
}
Scheduler is an interface which talks with cron scheduler
func (*Scheduler) AddCronFunction ¶
func (s *Scheduler) AddCronFunction(c CronFunction, invoker *types.Invoker) (ScheduledFunction, error)
AddCronFunction adds a function to cron
func (*Scheduler) Remove ¶
func (s *Scheduler) Remove(function ScheduledFunction)
Remove removes the function from scheduler