Documentation
¶
Overview ¶
Package whconfig is the webhooks: section of the platform configuration (#1870). Sources themselves are administrator-managed records in the database; this section only decides which replicas receive and which compact, and paces the compactor.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CompactorConfig ¶
type CompactorConfig struct {
Enabled *bool `yaml:"enabled"`
// Poll is how long an idle compactor waits before looking for work.
Poll time.Duration `yaml:"poll"`
// Grace is how long after a window ends the compactor waits for segments
// still being written into it.
Grace time.Duration `yaml:"grace"`
// Lease is how long a claimed window is held from other replicas.
Lease time.Duration `yaml:"lease"`
// Batch is how many windows one pass claims.
Batch int `yaml:"batch"`
// RetryBackoff is how long a failed window is held back, multiplied by its
// attempts, up to an hour.
RetryBackoff time.Duration `yaml:"retry_backoff"`
// RetentionEvery is how often retention runs.
RetentionEvery time.Duration `yaml:"retention_every"`
}
CompactorConfig decides whether this replica compacts and applies retention, and paces it.
type Config ¶
type Config struct {
Receiver ReceiverConfig `yaml:"receiver"`
Compactor CompactorConfig `yaml:"compactor"`
}
Config is the webhooks: section. Every field's zero value is its default, so a deployment sets nothing.
func (Config) CompactorEnabled ¶
CompactorEnabled reports whether this replica compacts.
func (Config) ReceiverEnabled ¶
ReceiverEnabled reports whether this replica serves /hooks/.
func (Config) WriteTimeout ¶
WriteTimeout is the receiver's segment write bound.
type ReceiverConfig ¶
type ReceiverConfig struct {
// Enabled defaults to on. A deployment that keeps bursts off the
// replicas serving MCP and the portal turns it off there and runs a
// receiver-only deployment of the same image behind its own Ingress.
Enabled *bool `yaml:"enabled"`
// Address, when set, also serves the receiver on a listener of its own,
// so it can sit behind its own Service. The main listener serves it
// either way.
Address string `yaml:"address"`
// WriteTimeout bounds writing one segment to object storage. A request
// whose segment has not been written by then is answered 503.
WriteTimeout time.Duration `yaml:"write_timeout"`
}
ReceiverConfig decides whether this replica serves /hooks/.