Documentation ¶
Index ¶
Constants ¶
View Source
const ( // DefaultCheckInterval is the shard precreation check time if none is specified. DefaultCheckInterval = 10 * time.Minute // DefaultAdvancePeriod is the default period ahead of the endtime of a shard group // that its successor group is created. DefaultAdvancePeriod = 30 * time.Minute )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Enabled bool `toml:"enabled"` CheckInterval toml.Duration `toml:"check-interval"` AdvancePeriod toml.Duration `toml:"advance-period"` }
Config represents the configuration for shard precreation.
type Service ¶
type Service struct { Logger *log.Logger MetaClient interface { PrecreateShardGroups(now, cutoff time.Time) error } // contains filtered or unexported fields }
Service manages the shard precreation service.
func NewService ¶
NewService returns an instance of the precreation service.
func (*Service) SetLogOutput ¶ added in v0.13.0
SetLogOutput sets the writer to which all logs are written. It must not be called after Open is called.
Click to show internal directories.
Click to hide internal directories.