influxdb/query/options/task.go

24 lines
521 B
Go
Raw Normal View History

// Package options implements flux options.
2018-07-17 21:38:46 +00:00
package options
import (
"github.com/influxdata/flux"
"github.com/influxdata/flux/values"
2018-07-17 21:38:46 +00:00
)
func init() {
flux.RegisterBuiltInOption("task", taskObject())
2018-07-17 21:38:46 +00:00
}
func taskObject() values.Object {
obj := values.NewObject()
obj.Set("name", values.NewString(""))
obj.Set("cron", values.NewString(""))
obj.Set("every", values.NewDuration(0))
obj.Set("delay", values.NewDuration(0))
obj.Set("concurrency", values.NewInt(0))
obj.Set("retry", values.NewInt(0))
2018-07-17 21:38:46 +00:00
return obj
}