Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CheckCollectorPipelineConfig ¶
type CheckCollectorPipelineConfig struct { // Enabled indicates whether to not enable collector pipeline check. Enabled bool `mapstructure:"enabled"` // Interval the time range to check healthy status of collector pipeline Interval string `mapstructure:"interval"` // ExporterFailureThreshold is the threshold of exporter failure numbers during the Interval ExporterFailureThreshold int `mapstructure:"exporter_failure_threshold"` }
CheckCollectorPipelineConfig is legacy config that is currently ignored as the `check_collector_pipeline` feature in the original healtcheck extension was not working as expected. This is here for backwards compatibility.
type Config ¶
type Config struct { confighttp.ServerConfig `mapstructure:",squash"` Config PathConfig `mapstructure:"config"` Status PathConfig `mapstructure:"status"` }
Config contains the v2 config for the http healthcheck service
type LegacyConfig ¶
type LegacyConfig struct { confighttp.ServerConfig `mapstructure:",squash"` // Path represents the path the health check service will serve. // The default path is "/". Path string `mapstructure:"path"` // ResponseBody represents the body of the response returned by the health check service. // This overrides the default response that it would return. ResponseBody *ResponseBodyConfig `mapstructure:"response_body"` // CheckCollectorPipeline contains the config for collector pipeline health checks. It is // retained for backwards compatibility, but is otherwise ignored. CheckCollectorPipeline *CheckCollectorPipelineConfig `mapstructure:"check_collector_pipeline"` // UseV2 is an explicit opt-in to v2 behavior. When true, LegacyConfig will be ignored. UseV2 bool `mapstructure:"use_v2"` }
LegacyConfig contains the config for the original healthcheck extension. We plan to migrate incrementally towards the v2 config and behavior. LegacyConfig is intentionally handled separately here and elsewhere to facilitate its eventual removal.
type PathConfig ¶
type ResponseBodyConfig ¶
type ResponseBodyConfig struct { // Healthy represents the body of the response returned when the collector is healthy. // The default value is "" Healthy string `mapstructure:"healthy"` // Unhealthy represents the body of the response returned when the collector is unhealthy. // The default value is "" Unhealthy string `mapstructure:"unhealthy"` }
ResponseBodyConfig is legacy config that is currently supported, but can eventually be deprecated and removed.
type SerializableEvent ¶ added in v0.105.0
type SerializableEvent struct { Healthy bool `json:"healthy"` StatusString string `json:"status"` Error string `json:"error,omitempty"` Timestamp time.Time `json:"status_time"` }
SerializableEvent is exported for json.Unmarshal
func (*SerializableEvent) Status ¶ added in v0.105.0
func (ev *SerializableEvent) Status() componentstatus.Status
type Server ¶ added in v0.105.0
type Server struct {
// contains filtered or unexported fields
}
func NewServer ¶ added in v0.105.0
func NewServer( config *Config, legacyConfig LegacyConfig, componentHealthConfig *common.ComponentHealthConfig, telemetry component.TelemetrySettings, aggregator *status.Aggregator, ) *Server
func (*Server) NotifyConfig ¶ added in v0.105.0
NotifyConfig implements the extension.ConfigWatcher interface.