Versions in this module Expand all Collapse all v1 v1.0.0 Nov 15, 2023 Changes in this version + func Namespaces(pods []Pod) []string + type Client struct + RestConfig *rest.Config + func NewClient(restConfig *rest.Config) (Client, error) + func (c Client) GetPods(ctx context.Context, namespace, labelSelector, fieldSelector string) ([]Pod, error) + type Container struct + Image string + Limits Resource + Name string + Requests Resource + type Forwarder struct + func StartForwarder(restConfig *rest.Config, namespace, podName, podPort string) (Forwarder, error) + func (f Forwarder) Get(path string, params url.Values) ([]byte, error) + func (f Forwarder) Stop() + type Pod struct + Containers []Container + InitContainers []Container + Name string + Namespace string + type Prometheus struct + func NewPrometheus(client Client, config PrometheusConfig) (Prometheus, error) + 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 struct + Labels string + Namespace string + type QueryData struct + Result json.RawMessage + ResultType string + type QueryResponse struct + Data QueryData + Status string + type Resource struct + Cpu *resource.Quantity + Memory *resource.Quantity + type ResultValue struct + Time time.Time + Value float64 + func (r *ResultValue) UnmarshalJSON(b []byte) error + type VectorResult struct + Metric map[string]string + Value ResultValue