Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultConfiguration = Configuration{ Global: DefaultGlobalConfiguration, } DefaultGlobalConfiguration = EndpointConfiguration{ Interval: 5 * time.Minute, Method: http.MethodGet, ValidStatusCodes: []int{http.StatusOK}, } )
Functions ¶
This section is empty.
Types ¶
type Agent ¶
type Agent struct {
// contains filtered or unexported fields
}
func New ¶
func New(c *kubernetes.Clientset, cfg Configuration, metrics *Metrics, logger *slog.Logger) (*Agent, error)
func NewWithListWatcher ¶
func NewWithListWatcher(lw cache.ListerWatcher, cfg Configuration, metrics *Metrics, logger *slog.Logger) (*Agent, error)
type Configuration ¶
type Configuration struct { Monitor string Token string Global EndpointConfiguration `yaml:"global,omitempty"` Hosts map[string]EndpointConfiguration `yaml:"hosts,omitempty"` }
func LoadFromFile ¶
func LoadFromFile(filename string) (Configuration, error)
type EndpointConfiguration ¶
type Metrics ¶
type Metrics struct { IngressEvents *prometheus.CounterVec Requests *prometheus.CounterVec Latency *prometheus.HistogramVec }
func NewMetrics ¶
func NewMetrics() *Metrics
func (Metrics) Collect ¶
func (m Metrics) Collect(ch chan<- prometheus.Metric)
func (Metrics) Describe ¶
func (m Metrics) Describe(ch chan<- *prometheus.Desc)
func (Metrics) ObserveEvent ¶
func (m Metrics) ObserveEvent(ev event)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.