fixedtimer

package
v1.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 28, 2019 License: MIT Imports: 4 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL