Documentation ¶
Index ¶
- Constants
- func SanitizeLabelName(s string) string
- type Builder
- func (b *Builder) Build() metricsstore.MetricsWriterList
- func (b *Builder) BuildStores() [][]cache.Store
- func (b *Builder) DefaultGenerateCustomResourceStoresFunc() ksmtypes.BuildCustomResourceStoresFunc
- func (b *Builder) DefaultGenerateStoresFunc() ksmtypes.BuildStoresFunc
- func (b *Builder) MergeFieldSelectors(selectors []string) (string, error)
- func (b *Builder) WithAllowAnnotations(annotations map[string][]string)
- func (b *Builder) WithAllowLabels(labels map[string][]string) error
- func (b *Builder) WithContext(ctx context.Context)
- func (b *Builder) WithCustomResourceClients(cs map[string]interface{})
- func (b *Builder) WithCustomResourceStoreFactories(fs ...customresource.RegistryFactory)
- func (b *Builder) WithEnabledResources(r []string) error
- func (b *Builder) WithFamilyGeneratorFilter(l generator.FamilyGeneratorFilter)
- func (b *Builder) WithFieldSelectorFilter(fieldSelectorFilter string)
- func (b *Builder) WithGenerateCustomResourceStoresFunc(f ksmtypes.BuildCustomResourceStoresFunc)
- func (b *Builder) WithGenerateStoresFunc(f ksmtypes.BuildStoresFunc)
- func (b *Builder) WithKubeClient(c clientset.Interface)
- func (b *Builder) WithMetrics(r prometheus.Registerer)
- func (b *Builder) WithNamespaces(n options.NamespaceList)
- func (b *Builder) WithSharding(shard int32, totalShards int)
- func (b *Builder) WithUsingAPIServerCache(u bool)
- func (b *Builder) WithUtilOptions(opts *options.Options)
Constants ¶
const ResourceDiscoveryInterval = 100 * time.Millisecond
ResourceDiscoveryInterval is the interval for the resource discovery.
const ResourceDiscoveryTimeout = 10 * time.Second
ResourceDiscoveryTimeout is the timeout for the resource discovery.
Variables ¶
This section is empty.
Functions ¶
func SanitizeLabelName ¶ added in v2.9.0
SanitizeLabelName replaces all invalid characters with an underscore.
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
Builder helps to build store. It follows the builder pattern (https://en.wikipedia.org/wiki/Builder_pattern).
func (*Builder) Build ¶
func (b *Builder) Build() metricsstore.MetricsWriterList
Build initializes and registers all enabled stores. It returns metrics writers which can be used to write out metrics from the stores.
func (*Builder) BuildStores ¶ added in v2.2.4
BuildStores initializes and registers all enabled stores. It returns metric stores which can be used to consume the generated metrics from the stores.
func (*Builder) DefaultGenerateCustomResourceStoresFunc ¶ added in v2.4.0
func (b *Builder) DefaultGenerateCustomResourceStoresFunc() ksmtypes.BuildCustomResourceStoresFunc
DefaultGenerateCustomResourceStoresFunc returns default buildCustomResourceStores function
func (*Builder) DefaultGenerateStoresFunc ¶ added in v2.1.1
func (b *Builder) DefaultGenerateStoresFunc() ksmtypes.BuildStoresFunc
DefaultGenerateStoresFunc returns default buildStores function
func (*Builder) MergeFieldSelectors ¶ added in v2.7.0
MergeFieldSelectors merges multiple fieldSelectors using AND operator.
func (*Builder) WithAllowAnnotations ¶ added in v2.2.0
WithAllowAnnotations configures which annotations can be returned for metrics
func (*Builder) WithAllowLabels ¶
WithAllowLabels configures which labels can be returned for metrics
func (*Builder) WithContext ¶
WithContext sets the ctx property of a Builder.
func (*Builder) WithCustomResourceClients ¶ added in v2.4.0
WithCustomResourceClients sets the customResourceClients property of a Builder.
func (*Builder) WithCustomResourceStoreFactories ¶ added in v2.4.0
func (b *Builder) WithCustomResourceStoreFactories(fs ...customresource.RegistryFactory)
WithCustomResourceStoreFactories returns configures a custom resource stores factory
func (*Builder) WithEnabledResources ¶
WithEnabledResources sets the enabledResources property of a Builder.
func (*Builder) WithFamilyGeneratorFilter ¶ added in v2.3.0
func (b *Builder) WithFamilyGeneratorFilter(l generator.FamilyGeneratorFilter)
WithFamilyGeneratorFilter configures the family generator filter which decides which metrics are to be exposed by the store build by the Builder.
func (*Builder) WithFieldSelectorFilter ¶ added in v2.7.0
WithFieldSelectorFilter sets the fieldSelector property of a Builder.
func (*Builder) WithGenerateCustomResourceStoresFunc ¶ added in v2.4.0
func (b *Builder) WithGenerateCustomResourceStoresFunc(f ksmtypes.BuildCustomResourceStoresFunc)
WithGenerateCustomResourceStoresFunc configures a custom generate custom resource store function
func (*Builder) WithGenerateStoresFunc ¶ added in v2.1.1
func (b *Builder) WithGenerateStoresFunc(f ksmtypes.BuildStoresFunc)
WithGenerateStoresFunc configures a custom generate store function
func (*Builder) WithKubeClient ¶
WithKubeClient sets the kubeClient property of a Builder.
func (*Builder) WithMetrics ¶
func (b *Builder) WithMetrics(r prometheus.Registerer)
WithMetrics sets the metrics property of a Builder.
func (*Builder) WithNamespaces ¶
func (b *Builder) WithNamespaces(n options.NamespaceList)
WithNamespaces sets the namespaces property of a Builder.
func (*Builder) WithSharding ¶
WithSharding sets the shard and totalShards property of a Builder.
func (*Builder) WithUsingAPIServerCache ¶ added in v2.4.0
WithUsingAPIServerCache configures whether using APIServer cache or not.
func (*Builder) WithUtilOptions ¶ added in v2.9.0
WithUtilOptions sets the utilOptions property of a Builder. These are the options that are necessary for the util package.
Source Files ¶
- builder.go
- certificatesigningrequest.go
- clusterrole.go
- clusterrolebinding.go
- configmap.go
- cronjob.go
- daemonset.go
- deployment.go
- endpoint.go
- endpointslice.go
- horizontalpodautoscaler.go
- ingress.go
- ingressclass.go
- job.go
- lease.go
- limitrange.go
- mutatingwebhookconfiguration.go
- namespace.go
- networkpolicy.go
- node.go
- persistentvolume.go
- persistentvolumeclaim.go
- pod.go
- poddisruptionbudget.go
- replicaset.go
- replicationcontroller.go
- resourcequota.go
- role.go
- rolebinding.go
- secret.go
- service.go
- serviceaccount.go
- statefulset.go
- storageclass.go
- testutils.go
- utils.go
- validatingwebhookconfiguration.go
- volumeattachment.go