Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetPrometheusResponse ¶
func SetPrometheusResponse(monitorName, monitorNamespace string, mp *MonitorParams, fw portforward.PortForward) error
Types ¶
type ActiveTargets ¶
type ActiveTargets struct { DiscoveredLabels DiscoveredLabels `json:"discoveredLabels"` Health string `json:"health"` }
type DiscoveredLabels ¶
type MonitorInterface ¶
type MonitorInterface interface { ServeQuery(w http.ResponseWriter, r *http.Request) ServeTargets(w http.ResponseWriter, r *http.Request) SetResponse(w http.ResponseWriter, r *http.Request) }
func NewMockPrometheus ¶
func NewMockPrometheus() MonitorInterface
type MonitorParams ¶
type MonitorParams struct { KubernetesNamespace string `json:"kubernetesNamespace"` Name string `json:"name"` MemberType string `json:"memberType"` Duration string `json:"duration"` Value string `json:"value"` InstancesPod []string `json:"instances"` QueryType string `json:"queryType"` StorageType string `json:"storageType"` }
type MonitorTargets ¶
type MonitorTargets struct { Status string `json:"status"` Data MonitorTargetsData `json:"data"` }
type MonitorTargetsData ¶
type MonitorTargetsData struct {
ActiveTargets []ActiveTargets `json:"activeTargets"`
}
Click to show internal directories.
Click to hide internal directories.