Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Configuration ¶
type Configuration struct { Name string Host string Path string Port uint32 Protocol healthcheck.Protocol Headers map[string]string `json:"headers,omitempty"` Query map[string]string `json:"query,omitempty"` Interval healthcheck.Duration `json:"interval"` Key string `json:"key,omitempty"` Cert string `json:"cert,omitempty"` Cacert string `json:"cacert,omitempty"` Insecure bool }
func (*Configuration) UnmarshalYAML ¶
func (configuration *Configuration) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML Parse a configuration from YAML.
type HTTPDiscovery ¶
type HTTPDiscovery struct { Logger *zap.Logger Healthcheck *healthcheck.Component URL string Config *Configuration Client *http.Client // contains filtered or unexported fields }
HTTPDiscovery the http discovery struct
func New ¶
func New(logger *zap.Logger, config *Configuration, checkComponent *healthcheck.Component, counter *prom.CounterVec, histogram *prom.HistogramVec) (*HTTPDiscovery, error)
New creates a new HTTP Discovery
func (*HTTPDiscovery) Start ¶
func (c *HTTPDiscovery) Start() error
Start starts the HTTP discovery component
func (*HTTPDiscovery) Stop ¶
func (c *HTTPDiscovery) Stop() error
Stop stops the HTTP discovery component
type ResultPayload ¶
type ResultPayload struct { CommandChecks []healthcheck.CommandHealthcheckConfiguration `json:"command-checks"` DNSChecks []healthcheck.DNSHealthcheckConfiguration `json:"dns-checks"` TCPChecks []healthcheck.TCPHealthcheckConfiguration `json:"tcp-checks"` HTTPChecks []healthcheck.HTTPHealthcheckConfiguration `json:"http-checks"` TLSChecks []healthcheck.TLSHealthcheckConfiguration `json:"tls-checks"` }
Click to show internal directories.
Click to hide internal directories.