Documentation ¶
Overview ¶
Package timer provides example code to setup ScheduledTaskProps with re-configurable schedule and sending room.
The configuration struct, timerConfig, implements both ScheduledConfig and DestinatedConfig interface. The configuration values are read from timer.yaml and Command is re-built when configuration file is updated.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var SlackProps = sarah.NewScheduledTaskPropsBuilder(). BotType(slack.SLACK). Identifier("timer"). ConfigurableFunc(&timerConfig{}, func(_ context.Context, config sarah.TaskConfig) ([]*sarah.ScheduledTaskResult, error) { return []*sarah.ScheduledTaskResult{ { Content: "It's time to work!!", Destination: config.(*timerConfig).DefaultDestination(), }, }, nil }). MustBuild()
SlackProps is a pre-built 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.