Documentation ¶
Overview ¶
Package scrape contains logic for scraping the health check endpoints of kubernetes pods that have specified the required annotations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Component ¶
type Component struct { Name string `json:"name"` Healthy bool `json:"healthy"` Message string `json:"message,omitempty"` }
The Component type represents a single aspect of a health check, this could be something like a database connection, gRPC client etc.
type PodHealth ¶
type PodHealth struct { PodName string `json:"podName"` Namespace string `json:"namespace"` Name string `json:"name"` Description string `json:"description"` Version string `json:"version"` Compiled time.Time `json:"compiled"` Healthy bool `json:"healthy"` Checks []*Component `json:"checks"` }
PodHealth represents the current health status of a given pod and its components.
type Scraper ¶
type Scraper struct {
// contains filtered or unexported fields
}
The Scraper type is responsible for determining pods to scrape the health check endpoints of based on their annotations.
func NewScraper ¶
func NewScraper(k8s *kubernetes.Clientset) *Scraper
NewScraper returns a new instance of the Scraper type that will look for appropriately annotated pods in the cluster configured with the provided kubernetes.Clientset.