Documentation ¶
Index ¶
- type BuildKruiseStoresFunc
- type Builder
- func (b *Builder) Build() []metricsstore.MetricsWriter
- func (b *Builder) DefaultGenerateStoresFunc() ksmtypes.BuildStoresFunc
- func (b *Builder) DefaultKruiseStoresFunc() BuildKruiseStoresFunc
- func (b *Builder) WithAllowAnnotations(annotations map[string][]string)
- func (b *Builder) WithAllowDenyList(l ksmtypes.AllowDenyLister)
- func (b *Builder) WithAllowLabels(labels map[string][]string)
- func (b *Builder) WithContext(ctx context.Context)
- func (b *Builder) WithEnabledResources(r []string) error
- func (b *Builder) WithGenerateStoresFunc(f ksmtypes.BuildStoresFunc, u bool)
- func (b *Builder) WithKruiseClient(c kruiseclientset.Interface)
- func (b *Builder) WithKruiseStoresFunc(f BuildKruiseStoresFunc, u bool)
- 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) WithVPAClient(c vpaclientset.Interface)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BuildKruiseStoresFunc ¶
type BuildKruiseStoresFunc func(metricFamilies []generator.FamilyGenerator, expectedType interface{}, listWatchFunc func(kruiseClient kruiseclientset.Interface, ns string) cache.ListerWatcher, useAPIServerCache bool, ) []*metricsstore.MetricsStore
BuildKruiseStoresFunc function signature that is used to return a list of metricsstore.MetricsStore
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.MetricsWriter
Build initializes and registers all enabled stores. It returns metrics writers which can be used to write out metrics from the stores.
func (*Builder) DefaultGenerateStoresFunc ¶
func (b *Builder) DefaultGenerateStoresFunc() ksmtypes.BuildStoresFunc
DefaultGenerateStoresFunc returns default buildStores function
func (*Builder) DefaultKruiseStoresFunc ¶
func (b *Builder) DefaultKruiseStoresFunc() BuildKruiseStoresFunc
DefaultKruiseStoresFunc returns default buildStores function
func (*Builder) WithAllowAnnotations ¶
WithAllowAnnotations configures which annotations can be returned for metrics
func (*Builder) WithAllowDenyList ¶
func (b *Builder) WithAllowDenyList(l ksmtypes.AllowDenyLister)
WithAllowDenyList configures the allow or denylisted metric to be exposed by the store build by the Builder.
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) WithEnabledResources ¶
WithEnabledResources sets the enabledResources property of a Builder.
func (*Builder) WithGenerateStoresFunc ¶
func (b *Builder) WithGenerateStoresFunc(f ksmtypes.BuildStoresFunc, u bool)
WithGenerateStoresFunc configures a custom generate store function
func (*Builder) WithKruiseClient ¶
func (b *Builder) WithKruiseClient(c kruiseclientset.Interface)
WithKruiseClient sets the kruiseClient property of a Builder.
func (*Builder) WithKruiseStoresFunc ¶
func (b *Builder) WithKruiseStoresFunc(f BuildKruiseStoresFunc, u bool)
WithKruiseStoresFunc configures a custom Kruise 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) WithVPAClient ¶
func (b *Builder) WithVPAClient(c vpaclientset.Interface)
WithVPAClient sets the vpaClient property of a Builder so that the verticalpodautoscaler collector can query VPA objects.