Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewHandlerFunc ¶
func NewHandlerFunc(t Target) func()
NewHandlerFunc creates a new handler function based on the target in the Handler struct. This function calls the target and loads the data into the database through the dedo API.
Types ¶
type Daemon ¶
type Daemon struct {
Targets []Target
}
Daemon is the primary API that the user uses to add targets and run call cycles on a continuous basis.
type Directive ¶
type Directive struct { Prefix string Configuration dedo.Configuration Warehouse dedo.Warehouse }
Directive defines where data from a target should go according to a provided dedo configuration and database.
type Schedule ¶
type Schedule struct { Type ScheduleType Window uint64 }
Schedule defines a call cycle schedule configuration to be consumed by the gocron API, returned by Target.Schedule.
type ScheduleType ¶
type ScheduleType int
ScheduleType abstracts the available window type constants for call cycle scheduling.
const ( Minute ScheduleType = 0 Hour ScheduleType = 1 Day ScheduleType = 2 Week ScheduleType = 3 )
Minute, Hour, Day, and Week constants are used by the daemon to determine how to schedule calls with the gocron API.