Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultBufferSize = 20000
DefaultBufferSize the default siez for the buffer containing healthchecks results
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Component ¶
type Component struct { Config *Configuration MemoryStore *memorystore.MemoryStore Logger *zap.Logger HTTP *http.Component Healthcheck *healthcheck.Component Exporter *exporter.Component Prometheus *prometheus.Prometheus Discovery *discovery.Component ChanResult chan *healthcheck.Result // contains filtered or unexported fields }
Component is the component which will manage the HTTP server and the program configuration
func New ¶
func New(logger *zap.Logger, config *Configuration) (*Component, error)
New creates and start a new daemon component
func (*Component) Reload ¶
func (c *Component) Reload(daemonConfig *Configuration) error
Reload reloads the Cabourotte daemon. This function will remove or keep existing healthchecks depending of the new configuration. New checks will be added. The HTTP server will also be reloaded if its configuration has changed.
func (*Component) ReloadHealthchecks ¶
func (c *Component) ReloadHealthchecks(daemonConfig *Configuration) error
ReloadHealthchecks reloads the healthchecks from a configuration
type Configuration ¶
type Configuration struct { ResultBuffer uint `yaml:"result-buffer"` HTTP http.Configuration HealthchecksLabels []string `yaml:"healthchecks-labels"` CommandChecks []healthcheck.CommandHealthcheckConfiguration `yaml:"command-checks"` DNSChecks []healthcheck.DNSHealthcheckConfiguration `yaml:"dns-checks"` TCPChecks []healthcheck.TCPHealthcheckConfiguration `yaml:"tcp-checks"` HTTPChecks []healthcheck.HTTPHealthcheckConfiguration `yaml:"http-checks"` TLSChecks []healthcheck.TLSHealthcheckConfiguration `yaml:"tls-checks"` Exporters exporter.Configuration Discovery discovery.Configuration }
Configuration the HTTP server configuration
func (*Configuration) UnmarshalYAML ¶
func (configuration *Configuration) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML Parse a configuration from YAML.
Click to show internal directories.
Click to hide internal directories.