metrics

package
v0.0.0-...-3acc49a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 31, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Host string
	// contains filtered or unexported fields
}

func NewClient

func NewClient() *Client

NewClient returns a new MetricClient representing a metric client.

func (Client) AllMetrics

func (c Client) AllMetrics(pod *v1.Pod) (map[string]interface{}, error)

AllMetrics returns all the metrics available for the pod.

func (Client) RequestCount

func (c Client) RequestCount(pod *v1.Pod) (map[string]interface{}, error)

RequestCount returns the average pod request within the current time window.

func (Client) ResponseTime

func (c Client) ResponseTime(pod *v1.Pod) (map[string]interface{}, error)

ResponseTime returns the average pod response time.

func (Client) Throughput

func (c Client) Throughput(pod *v1.Pod) (map[string]interface{}, error)

Throughput returns the average pod throughput.

type MetricType

type MetricType string
const (
	ResponseTime MetricType = "response_time"
	RequestCount MetricType = "request_count"
	Throughput   MetricType = "throughput"
	All          MetricType = ""
)

func (MetricType) String

func (m MetricType) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL