Documentation ¶
Overview ¶
Package fixedtimer provides example code to setup ScheduledTaskProps with fixed schedule.
The configuration struct, timerConfig, does not implement ScheduledConfig interface, but instead fixed schedule is provided via ScheduledTaskPropsBuilder.Schedule. Schedule never changes no matter how many times the configuration file, fixed_timer.yaml, is updated.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var SlackProps = sarah.NewScheduledTaskPropsBuilder(). BotType(slack.SLACK). Identifier("fixed_timer"). ConfigurableFunc(&timerConfig{}, func(_ context.Context, config sarah.TaskConfig) ([]*sarah.ScheduledTaskResult, error) { return []*sarah.ScheduledTaskResult{ { Content: "Howdy!!", Destination: config.(*timerConfig).DefaultDestination(), }, }, nil }). Schedule("@every 1m"). MustBuild()
SlackProps is a pre-built fixed_timer task properties for Slack.
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.