Documentation
¶
Overview ¶
Package options provides ways to extract the task-related options from a Flux script.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnableScriptCacheForTest ¶
func EnableScriptCacheForTest()
EnableScriptCacheForTest is used as a workaround for https://github.com/influxdata/platform/issues/484, and should be removed after that issue is addressed. Do not call this method in production code, as it will leak memory.
Types ¶
type Options ¶
type Options struct {
// Name is a non optional name designator for each task.
Name string
// Cron is a cron style time schedule that can be used in place of Every.
Cron string
// Every represents a fixed period to repeat execution.
Every time.Duration
// Offset represents a delay before execution.
Offset time.Duration
Concurrency int64
Retry int64
}
Options are the task-related options that can be specified in a Flux script.
func FromScript ¶
FromScript extracts Options from a Flux script.
func (*Options) EffectiveCronString ¶
EffectiveCronString returns the effective cron string of the options. If the cron option was specified, it is returned. If the every option was specified, it is converted into a cron string using "@every". Otherwise, the empty string is returned. The value of the offset option is not considered.