timer

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 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.

Jump to

Keyboard shortcuts

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