whconfig

package
v1.136.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 26, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

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

func (c Config) CompactorEnabled() bool

CompactorEnabled reports whether this replica compacts.

func (Config) ReceiverEnabled

func (c Config) ReceiverEnabled() bool

ReceiverEnabled reports whether this replica serves /hooks/.

func (Config) Tuning

func (c Config) Tuning() compactor.Tuning

Tuning is the compactor's pacing, defaults applied by the compactor.

func (Config) Validate

func (c Config) Validate() error

Validate refuses a section that cannot pace anything.

func (Config) WriteTimeout

func (c Config) WriteTimeout() time.Duration

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/.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL