Documentation ¶
Index ¶
- Variables
- type Builder
- func (b *Builder) Build() []*metricsstore.MetricsStore
- func (b *Builder) WithApiserver(apiserver string) *Builder
- func (b *Builder) WithEnabledCollectors(c []string) *Builder
- func (b *Builder) WithKubeConfig(kubeconfig string) *Builder
- func (b *Builder) WithNamespaces(n options.NamespaceList) *Builder
- func (b *Builder) WithWhiteBlackList(l whiteBlackLister) *Builder
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ScrapeErrorTotalMetric = prometheus.NewCounterVec( prometheus.CounterOpts{ Name: "ksm_scrape_error_total", Help: "Total scrape errors encountered when scraping a resource", }, []string{"resource"}, ) ResourcesPerScrapeMetric = prometheus.NewSummaryVec( prometheus.SummaryOpts{ Name: "ksm_resources_per_scrape", Help: "Number of resources returned per scrape", }, []string{"resource"}, ) )
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
Builder helps to build collectors. It follows the builder pattern (https://en.wikipedia.org/wiki/Builder_pattern).
func NewBuilder ¶
NewBuilder returns a new builder.
func (*Builder) Build ¶
func (b *Builder) Build() []*metricsstore.MetricsStore
Build initializes and registers all enabled collectors.
func (*Builder) WithApiserver ¶
func (*Builder) WithEnabledCollectors ¶
WithEnabledCollectors sets the enabledCollectors property of a Builder.
func (*Builder) WithKubeConfig ¶
func (*Builder) WithNamespaces ¶
func (b *Builder) WithNamespaces(n options.NamespaceList) *Builder
WithNamespaces sets the namespaces property of a Builder.
func (*Builder) WithWhiteBlackList ¶
WithWhiteBlackList configures the white or blacklisted metrics to be exposed by the collectors build by the Builder
Click to show internal directories.
Click to hide internal directories.