Documentation ¶
Overview ¶
Package precreator provides the shard precreation service.
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.
func (Config) Diagnostics ¶ added in v1.3.0
func (c Config) Diagnostics() (*diagnostics.Diagnostics, error)
Diagnostics returns a diagnostics representation of a subset of the Config.
type Service ¶
type Service struct { Logger zap.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) WithLogger ¶ added in v1.2.3
WithLogger sets the logger for the service.
Click to show internal directories.
Click to hide internal directories.