Documentation ¶
Index ¶
- Variables
- func Average(values ...float64) float64
- func CustomMetricsHTTPClient(requestTimeout time.Duration, connectTimeout time.Duration) *http.Client
- func DefaultMetricsHTTPClient() *http.Client
- func Maximum(values ...float64) float64
- func Minimum(values ...float64) float64
- func Sum(values ...float64) float64
- type AggregatorFunc
- type JSONPathMetricsGetter
- type PodMetricsGetter
- type PodMetricsJSONPathGetter
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultConnectTimeout = 15 * time.Second
View Source
var DefaultRequestTimeout = 15 * time.Second
Functions ¶
func CustomMetricsHTTPClient ¶ added in v0.1.4
func Maximum ¶
Maximum implements the absolute maximum mathematical function over a slice of float64
Types ¶
type AggregatorFunc ¶
func ParseAggregator ¶
func ParseAggregator(aggregator string) (AggregatorFunc, error)
reduce will reduce a slice of numbers given a aggregator function's name. If it's empty or not recognized, an error is returned.
type JSONPathMetricsGetter ¶
type JSONPathMetricsGetter struct {
// contains filtered or unexported fields
}
JSONPathMetricsGetter is a metrics getter which looks up pod metrics by querying the pods metrics endpoint and lookup the metric value as defined by the json path query.
func NewJSONPathMetricsGetter ¶
func NewJSONPathMetricsGetter(httpClient *http.Client, aggregatorFunc AggregatorFunc, jsonPath string) (*JSONPathMetricsGetter, error)
NewJSONPathMetricsGetter initializes a new JSONPathMetricsGetter.
type PodMetricsJSONPathGetter ¶
type PodMetricsJSONPathGetter struct {
// contains filtered or unexported fields
}
func NewPodMetricsJSONPathGetter ¶
func NewPodMetricsJSONPathGetter(config map[string]string) (*PodMetricsJSONPathGetter, error)
Click to show internal directories.
Click to hide internal directories.