Documentation ¶
Overview ¶
Package remotemetrics contains the logic to scrape and parse metrics from a remote cluster.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Aggregator ¶
Aggregator is the interface for a metrics aggregator.
type MappedNamespace ¶
MappedNamespace contains both the original and the mapped namespace names.
type Mapper ¶
Mapper is the interface for a mapper.
func NewNamespaceMapper ¶
func NewNamespaceMapper(namespaces ...MappedNamespace) Mapper
NewNamespaceMapper returns a new namespace mapper.
type Matcher ¶
Matcher is the interface for a matcher.
func MatchNamespaces ¶
func MatchNamespaces(namespaces ...MappedNamespace) Matcher
MatchNamespaces returns a matcher that matches the given namespaces.
type MatcherCollection ¶
type MatcherCollection interface { Matcher Add(matcher Matcher) MatcherCollection }
MatcherCollection is the interface for a matcher collection.
func MatchAll ¶
func MatchAll() MatcherCollection
MatchAll returns a matcher that matches all the given matchers.
func MatchAny ¶
func MatchAny() MatcherCollection
MatchAny returns a matcher that matches any of the given matchers.
func MatchNodeMetrics ¶
func MatchNodeMetrics() MatcherCollection
MatchNodeMetrics returns a matcher that matches the node metrics.
type Metric ¶
type Metric struct {
// contains filtered or unexported fields
}
Metric contains the scraped prometheus metrics.
type ResourceGetter ¶
type ResourceGetter interface { GetNamespaces(ctx context.Context, clusterID string) []MappedNamespace GetPodNames(ctx context.Context, clusterID, node string) []string GetNodeNames(ctx context.Context) []string }
ResourceGetter is the interface for a local resource getter.
func NewResourceGetter ¶
func NewResourceGetter(cl client.Client) ResourceGetter
NewResourceGetter creates a new resource getter.