Documentation
¶
Index ¶
- Variables
- func CheckAllPods(pods map[string]string) *models.CheckAllResults
- func CheckNeighbours(ps *PodSelecter) *models.CheckResults
- func CheckNeighboursNeighbours(ps *PodSelecter) *models.CheckAllResults
- func CountCall(group string, call string)
- func CountDnsError(host string)
- func CountError(errorType string)
- func CountHealthyUnhealthyNodes(healthy, unhealthy float64)
- func GetAllPods() map[string]string
- func GetLabeledKubernetesCallsTimer() *prometheus.Timer
- func GetLabeledPeersCallsTimer(callType, hostIP, podIP string) *prometheus.Timer
- func GetStats() *models.PingResults
- func HealthCheck() *models.HealthCheckResults
- func HeatmapHandler(w http.ResponseWriter, r *http.Request)
- func PingAllPods(pods map[string]string) *models.CheckResults
- func StartUpdater()
- type CheckServicePodsResult
- type PingAllPodsResult
- type PodSelecter
Constants ¶
This section is empty.
Variables ¶
var GoldpingerConfig = struct { StaticFilePath string `long:"static-file-path" description:"Folder for serving static files" env:"STATIC_FILE_PATH"` KubeConfigPath string `long:"kubeconfig" description:"Path to kubeconfig file" env:"KUBECONFIG"` RefreshInterval int `` /* 136-byte string literal not displayed */ Hostname string `long:"hostname" description:"Hostname to use" env:"HOSTNAME"` PodIP string `long:"pod-ip" description:"Pod IP to use" env:"POD_IP"` PingNumber uint `` /* 138-byte string literal not displayed */ Port int `long:"client-port-override" description:"(for testing) use this port when calling other instances" env:"CLIENT_PORT_OVERRIDE"` UseHostIP bool `long:"use-host-ip" description:"When making the calls, use host ip (defaults to pod ip)" env:"USE_HOST_IP"` LabelSelector string `` /* 146-byte string literal not displayed */ KubernetesClient *kubernetes.Clientset *PodSelecter DnsHosts []string `long:"host-to-resolve" description:"A host to attempt dns resolve on (space delimited)" env:"HOSTS_TO_RESOLVE" env-delim:" "` }{}
GoldpingerConfig represents the configuration for goldpinger
Functions ¶
func CheckAllPods ¶
func CheckAllPods(pods map[string]string) *models.CheckAllResults
func CheckNeighbours ¶
func CheckNeighbours(ps *PodSelecter) *models.CheckResults
CheckNeighbours queries the kubernetes API server for all other goldpinger pods then calls Ping() on each one
func CheckNeighboursNeighbours ¶
func CheckNeighboursNeighbours(ps *PodSelecter) *models.CheckAllResults
CheckNeighboursNeighbours queries the kubernetes API server for all other goldpinger pods then calls Check() on each one
func CountHealthyUnhealthyNodes ¶
func CountHealthyUnhealthyNodes(healthy, unhealthy float64)
counts healthy and unhealthy nodes
func GetAllPods ¶
GetAllPods returns a map of Pod IP to Host IP based on a label selector defined in config
func GetLabeledKubernetesCallsTimer ¶
func GetLabeledKubernetesCallsTimer() *prometheus.Timer
returns a timer for easy observing of the durations of calls to kubernetes API
func GetLabeledPeersCallsTimer ¶
func GetLabeledPeersCallsTimer(callType, hostIP, podIP string) *prometheus.Timer
returns a timer for easy observing of the duration of calls to peers
func GetStats ¶
func GetStats() *models.PingResults
func HealthCheck ¶
func HealthCheck() *models.HealthCheckResults
func HeatmapHandler ¶
func HeatmapHandler(w http.ResponseWriter, r *http.Request)
HeatmapHandler returns a PNG with a heatmap representation
func PingAllPods ¶
func PingAllPods(pods map[string]string) *models.CheckResults
func StartUpdater ¶
func StartUpdater()
Types ¶
type CheckServicePodsResult ¶
type CheckServicePodsResult struct {
// contains filtered or unexported fields
}
type PingAllPodsResult ¶
type PingAllPodsResult struct {
// contains filtered or unexported fields
}
type PodSelecter ¶
type PodSelecter struct {
// contains filtered or unexported fields
}
PodSelecter selects the result of getPods() down to count instances according to a rendezvous hash.
func NewPodSelecter ¶
func NewPodSelecter(count uint, podIP string, getPods func() map[string]string) *PodSelecter
NewPodSelecter creates a new PodSelecter struct.
func (*PodSelecter) SelectPods ¶
func (p *PodSelecter) SelectPods() map[string]string
SelectPods returns a map of pods filtered according to its configuration.