Documentation ¶
Index ¶
- func InstallOpenAPIV2(container *restful.Container, webServices []*restful.WebService) (*handler.OpenAPIService, *spec.Swagger, error)
- func InstallOpenAPIV3(container *restful.Container, webServices []*restful.WebService) (*handler3.OpenAPIService, error)
- func InstallRootAPIs(container *restful.Container) discovery.GroupManager
- type CustomMetricsProvider
- func (p *CustomMetricsProvider) GetMetricByName(ctx context.Context, name types.NamespacedName, info provider.CustomMetricInfo, ...) (*custom_metrics.MetricValue, error)
- func (p *CustomMetricsProvider) GetMetricBySelector(ctx context.Context, namespace string, selector labels.Selector, ...) (*custom_metrics.MetricValueList, error)
- func (p *CustomMetricsProvider) Install(container *restful.Container, discoveryGroupManager discovery.GroupManager) error
- func (p *CustomMetricsProvider) ListAllMetrics() []provider.CustomMetricInfo
- type CustomMetricsProviderConfig
- type ExternalMetricProviderConfig
- type ExternalMetricsProvider
- func (p *ExternalMetricsProvider) GetExternalMetric(ctx context.Context, namespace string, metricSelector labels.Selector, ...) (*external_metrics.ExternalMetricValueList, error)
- func (p *ExternalMetricsProvider) Install(container *restful.Container, discoveryGroupManager discovery.GroupManager) error
- func (p *ExternalMetricsProvider) ListAllExternalMetrics() []provider.ExternalMetricInfo
- type Store
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InstallOpenAPIV2 ¶
func InstallOpenAPIV2(container *restful.Container, webServices []*restful.WebService) (*handler.OpenAPIService, *spec.Swagger, error)
InstallOpenAPIV2 adds the SwaggerUI webservice to the given mux.
func InstallOpenAPIV3 ¶
func InstallOpenAPIV3(container *restful.Container, webServices []*restful.WebService) (*handler3.OpenAPIService, error)
InstallOpenAPIV3 adds the static group/versions defined in the RegisteredWebServices to the OpenAPI v3 spec
func InstallRootAPIs ¶
func InstallRootAPIs(container *restful.Container) discovery.GroupManager
InstallRootAPIs installs the root APIs for the apiserver.
Types ¶
type CustomMetricsProvider ¶
type CustomMetricsProvider struct {
// contains filtered or unexported fields
}
CustomMetricsProvider is an implementation of provider.CustomMetricsProvider
func NewCustomMetricsProvider ¶
func NewCustomMetricsProvider(conf CustomMetricsProviderConfig) *CustomMetricsProvider
NewCustomMetricsProvider creates a new CustomMetricsProvider
func (*CustomMetricsProvider) GetMetricByName ¶
func (p *CustomMetricsProvider) GetMetricByName(ctx context.Context, name types.NamespacedName, info provider.CustomMetricInfo, metricSelector labels.Selector) (*custom_metrics.MetricValue, error)
GetMetricByName returns the value of a single metric for a single object
func (*CustomMetricsProvider) GetMetricBySelector ¶
func (p *CustomMetricsProvider) GetMetricBySelector(ctx context.Context, namespace string, selector labels.Selector, info provider.CustomMetricInfo, metricSelector labels.Selector) (*custom_metrics.MetricValueList, error)
GetMetricBySelector returns the value of a metric for all objects which match a resource selector
func (*CustomMetricsProvider) Install ¶
func (p *CustomMetricsProvider) Install(container *restful.Container, discoveryGroupManager discovery.GroupManager) error
Install installs the custom metrics API for the server.
func (*CustomMetricsProvider) ListAllMetrics ¶
func (p *CustomMetricsProvider) ListAllMetrics() []provider.CustomMetricInfo
ListAllMetrics returns the list of all metrics provided by this API
type CustomMetricsProviderConfig ¶
type CustomMetricsProviderConfig struct { DynamicClient dynamic.Interface RESTMapper apimeta.RESTMapper CustomMetric Store[*v1alpha1.CustomMetric] }
CustomMetricsProviderConfig is a configuration struct for CustomMetricsProvider
type ExternalMetricProviderConfig ¶
type ExternalMetricProviderConfig struct {
ExternalMetric Store[*v1alpha1.ExternalMetric]
}
ExternalMetricProviderConfig is a configuration struct for ExternalMetricProvider
type ExternalMetricsProvider ¶
type ExternalMetricsProvider struct {
// contains filtered or unexported fields
}
ExternalMetricsProvider is an implementation of provider.ExternalMetricsProvider
func NewExternalMetricsProvider ¶
func NewExternalMetricsProvider(conf ExternalMetricProviderConfig) *ExternalMetricsProvider
NewExternalMetricsProvider returns a new ExternalMetricsProvider
func (*ExternalMetricsProvider) GetExternalMetric ¶
func (p *ExternalMetricsProvider) GetExternalMetric(ctx context.Context, namespace string, metricSelector labels.Selector, info provider.ExternalMetricInfo) (*external_metrics.ExternalMetricValueList, error)
GetExternalMetric returns the external metric value for the given metric name and selector
func (*ExternalMetricsProvider) Install ¶
func (p *ExternalMetricsProvider) Install(container *restful.Container, discoveryGroupManager discovery.GroupManager) error
Install registers the external metrics API and handlers
func (*ExternalMetricsProvider) ListAllExternalMetrics ¶
func (p *ExternalMetricsProvider) ListAllExternalMetrics() []provider.ExternalMetricInfo
ListAllExternalMetrics returns the list of all external metrics
type Store ¶
type Store[T any] interface { // List returns a list of all the currently non-empty accumulators List() []T // ListKeys returns a list of all the keys currently associated with non-empty accumulators ListKeys() []string // GetByKey returns the accumulator associated with the given key GetByKey(key string) (item T, exists bool, err error) // Resync is meaningless in the terms appearing here but has // meaning in some implementations that have non-trivial // additional behavior (e.g., DeltaFIFO). Resync() error }