Documentation
¶
Overview ¶
Package components resolves the upstream executables managed by Arveld.
Index ¶
Constants ¶
const ManagedAlertmanagerReadinessEndpoint = ManagedAlertmanagerURL + "/-/ready"
ManagedAlertmanagerReadinessEndpoint is the readiness endpoint of managed Alertmanager.
const ManagedAlertmanagerURL = "http://" + alertmanagerListenAddress
ManagedAlertmanagerURL is the base URL of managed Alertmanager.
const ManagedPrometheusReadinessEndpoint = ManagedPrometheusURL + "/-/ready"
ManagedPrometheusReadinessEndpoint is the readiness endpoint of managed Prometheus.
const ManagedPrometheusURL = "http://" + prometheusListenAddress
ManagedPrometheusURL is the base URL of managed Prometheus.
Variables ¶
This section is empty.
Functions ¶
func ValidatePrometheusRetention ¶
func ValidatePrometheusRetention(config PrometheusConfig) error
ValidatePrometheusRetention reports whether Prometheus accepts the retention settings.
Types ¶
type PrometheusConfig ¶
PrometheusConfig contains the managed Prometheus configuration.
type ReadinessProbe ¶
type ReadinessProbe struct {
// contains filtered or unexported fields
}
ReadinessProbe checks the current readiness of a component endpoint.
func NewReadinessProbe ¶
func NewReadinessProbe() *ReadinessProbe
NewReadinessProbe creates a readiness probe with a bounded request timeout.
type Supervisor ¶
type Supervisor struct {
// contains filtered or unexported fields
}
Supervisor installs and runs managed upstream components.
func NewSupervisor ¶
func NewSupervisor( config SupervisorConfig, logger *slog.Logger, ) *Supervisor
NewSupervisor assembles the installer, readiness probe and process supervision. config.DownloadTimeout must be positive and bounds each archive transfer.
func (*Supervisor) RunManaged ¶
func (supervisor *Supervisor) RunManaged( ctx context.Context, ready chan<- struct{}, ) error
RunManaged supervises Alertmanager and starts Prometheus once Alertmanager is ready. The caller must prepare the Alertmanager configuration before this call. It closes ready once both components are initially ready; ready must be non-nil and owned by this call. The signal does not track later readiness changes. Before returning, RunManaged cancels and waits for all processes and readiness tasks.
type SupervisorConfig ¶
type SupervisorConfig struct {
DataDirectory string
DownloadTimeout time.Duration
Prometheus PrometheusConfig
}
SupervisorConfig configures installation and storage of managed components.