Documentation ¶
Index ¶
- func Namespaces(pods []Pod) []string
- type Client
- type Container
- type Forwarder
- type Pod
- type Prometheus
- func (p Prometheus) CPU(namespace, pod, container string) (float64, error)
- func (p Prometheus) MaxCPU(namespace, pod, container string) (float64, error)
- func (p Prometheus) MaxMemory(namespace, pod, container string) (float64, error)
- func (p Prometheus) Memory(namespace, pod, container string) (float64, error)
- func (p Prometheus) MinCPU(namespace, pod, container string) (float64, error)
- func (p Prometheus) MinMemory(namespace, pod, container string) (float64, error)
- func (p Prometheus) Stop()
- func (p Prometheus) ThrottledCPU(namespace, pod, container string) (float64, error)
- type PrometheusConfig
- type QueryData
- type QueryResponse
- type Resource
- type ResultValue
- type VectorResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Namespaces ¶
Types ¶
type Forwarder ¶
type Forwarder struct {
// contains filtered or unexported fields
}
func StartForwarder ¶
type Prometheus ¶
type Prometheus struct {
// contains filtered or unexported fields
}
func NewPrometheus ¶
func NewPrometheus(client Client, config PrometheusConfig) (Prometheus, error)
func (Prometheus) MaxCPU ¶
func (p Prometheus) MaxCPU(namespace, pod, container string) (float64, error)
func (Prometheus) MaxMemory ¶
func (p Prometheus) MaxMemory(namespace, pod, container string) (float64, error)
func (Prometheus) Memory ¶
func (p Prometheus) Memory(namespace, pod, container string) (float64, error)
func (Prometheus) MinCPU ¶
func (p Prometheus) MinCPU(namespace, pod, container string) (float64, error)
func (Prometheus) MinMemory ¶
func (p Prometheus) MinMemory(namespace, pod, container string) (float64, error)
func (Prometheus) Stop ¶
func (p Prometheus) Stop()
func (Prometheus) ThrottledCPU ¶
func (p Prometheus) ThrottledCPU(namespace, pod, container string) (float64, error)
TODO - only call if the container has cpu limit set
type PrometheusConfig ¶
type QueryData ¶
type QueryData struct { ResultType string `json:"resultType"` // "matrix" | "vector" | "scalar" | "string" Result json.RawMessage `json:"result"` }
type QueryResponse ¶
type ResultValue ¶
func (*ResultValue) UnmarshalJSON ¶
func (r *ResultValue) UnmarshalJSON(b []byte) error
type VectorResult ¶
type VectorResult struct { Metric map[string]string `json:"metric"` Value ResultValue `json:"value"` }
Click to show internal directories.
Click to hide internal directories.