2015-06-04 21:31:23 +00:00
|
|
|
package retention
|
|
|
|
|
2015-06-05 04:36:16 +00:00
|
|
|
import (
|
2015-06-05 18:23:54 +00:00
|
|
|
"time"
|
|
|
|
|
2015-06-05 04:36:16 +00:00
|
|
|
"github.com/influxdb/influxdb/toml"
|
|
|
|
)
|
2015-06-04 21:31:23 +00:00
|
|
|
|
2015-11-16 21:43:25 +00:00
|
|
|
// Config represents the configuration for the retention service.
|
2015-06-04 21:31:23 +00:00
|
|
|
type Config struct {
|
2015-06-05 04:36:16 +00:00
|
|
|
Enabled bool `toml:"enabled"`
|
|
|
|
CheckInterval toml.Duration `toml:"check-interval"`
|
2015-06-04 21:31:23 +00:00
|
|
|
}
|
2015-06-05 18:23:54 +00:00
|
|
|
|
2015-11-16 21:43:25 +00:00
|
|
|
// NewConfig returns an instance of Config with defaults.
|
2015-06-05 18:23:54 +00:00
|
|
|
func NewConfig() Config {
|
2015-08-26 20:06:04 +00:00
|
|
|
return Config{Enabled: true, CheckInterval: toml.Duration(30 * time.Minute)}
|
2015-06-05 18:23:54 +00:00
|
|
|
}
|