Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager syncs periodic tasks from an external config source into the dureq scheduler. It adds new tasks, updates changed tasks, and removes tasks that no longer appear in the provider output.
func NewManager ¶
func NewManager(cfg ManagerConfig) *Manager
NewManager creates a new periodic task manager.
type ManagerConfig ¶
type ManagerConfig struct {
// Provider returns the current set of periodic task configs.
Provider types.PeriodicTaskConfigProvider
// Client is the dureq client used to enqueue/update schedules.
Client *client.Client
// SyncInterval is how often to re-sync with the provider. Default: 1m.
SyncInterval time.Duration
Logger chainedlog.Logger
}
ManagerConfig configures the PeriodicTaskManager.
Click to show internal directories.
Click to hide internal directories.