Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MatchAllNames ¶
func NewCollector ¶
func NewCollector(opts *CollectorOpts) prometheus.Collector
Types ¶
type CollectorOpts ¶
type CollectorOpts struct { Cfg *MetricConfig Namespace string DynamicClient *dynamic.DynamicClient Client *clientset.Clientset Log log.Logger }
type MatchingFn ¶
func MatchRe ¶
func MatchRe(re *regexp.Regexp) MatchingFn
type MetricConfig ¶
type MetricConfig map[string]*ResourceSet
func (*MetricConfig) LoadFrom ¶
func (mc *MetricConfig) LoadFrom(file string) error
type MetricSet ¶
type MetricSet struct { // Flag indicating whether to group resource size by name or not. // When true, every resource will have its own metric with label "resource_name" set to actual name NameLabel *bool `yaml:"nameLabel,omitempty"` // Regular expression to filter resources IncludeOnly *regexp.Regexp `yaml:"includeOnly,omitempty"` // Estimated size of resource serialized as JSON Size *bool `yaml:"size,omitempty"` // Number of resources in this metric set Count *bool `yaml:"count,omitempty"` // not persisted fields // resolved MatchingFn ResourceNameMatcher MatchingFn `yaml:"-"` // v1.APIResource associated with this metric set Schema *v1.APIResource `yaml:"-"` // schema.GroupVersion for this metric set GV *schema.GroupVersion `yaml:"-"` }
type ResourceSet ¶
Click to show internal directories.
Click to hide internal directories.