Documentation ¶
Index ¶
- func RegisterAPIMetrics(registrationFunc func(metrics.Registerable) error) error
- type MetricsGetter
- type NodeMetrics
- func (m *NodeMetrics) ConvertToTable(ctx context.Context, object runtime.Object, tableOptions runtime.Object) (*metav1beta1.Table, error)
- func (m *NodeMetrics) Destroy()
- func (m *NodeMetrics) Get(ctx context.Context, name string, opts *metav1.GetOptions) (runtime.Object, error)
- func (m *NodeMetrics) Kind() string
- func (m *NodeMetrics) List(ctx context.Context, options *metainternalversion.ListOptions) (runtime.Object, error)
- func (m *NodeMetrics) NamespaceScoped() bool
- func (m *NodeMetrics) New() runtime.Object
- func (m *NodeMetrics) NewList() runtime.Object
- type NodeMetricsGetter
- type PodMetrics
- func (m *PodMetrics) ConvertToTable(ctx context.Context, object runtime.Object, tableOptions runtime.Object) (*metav1beta1.Table, error)
- func (m *PodMetrics) Destroy()
- func (m *PodMetrics) Get(ctx context.Context, name string, opts *metav1.GetOptions) (runtime.Object, error)
- func (m *PodMetrics) Kind() string
- func (m *PodMetrics) List(ctx context.Context, options *metainternalversion.ListOptions) (runtime.Object, error)
- func (m *PodMetrics) NamespaceScoped() bool
- func (m *PodMetrics) New() runtime.Object
- func (m *PodMetrics) NewList() runtime.Object
- type PodMetricsGetter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterAPIMetrics ¶
func RegisterAPIMetrics(registrationFunc func(metrics.Registerable) error) error
RegisterAPIMetrics registers a histogram metric for the freshness of exported metrics.
Types ¶
type MetricsGetter ¶
type MetricsGetter interface { PodMetricsGetter NodeMetricsGetter }
MetricsGetter is both a PodMetricsGetter and a NodeMetricsGetter
func NewMetricsGetter ¶
func NewMetricsGetter( informer informermanager.FederatedInformerManager, logger klog.Logger, ) MetricsGetter
type NodeMetrics ¶
type NodeMetrics struct {
// contains filtered or unexported fields
}
func NewNodeMetrics ¶
func NewNodeMetrics( groupResource schema.GroupResource, metrics NodeMetricsGetter, nodeLister corev1listers.NodeLister, nodeSelector []labels.Requirement, ) *NodeMetrics
func (*NodeMetrics) ConvertToTable ¶
func (m *NodeMetrics) ConvertToTable(ctx context.Context, object runtime.Object, tableOptions runtime.Object) (*metav1beta1.Table, error)
ConvertToTable implements rest.TableConvertor interface
func (*NodeMetrics) Destroy ¶
func (m *NodeMetrics) Destroy()
Destroy implements rest.Storage interface
func (*NodeMetrics) Get ¶
func (m *NodeMetrics) Get(ctx context.Context, name string, opts *metav1.GetOptions) (runtime.Object, error)
Get implements rest.Getter interface
func (*NodeMetrics) Kind ¶
func (m *NodeMetrics) Kind() string
Kind implements rest.KindProvider interface
func (*NodeMetrics) List ¶
func (m *NodeMetrics) List(ctx context.Context, options *metainternalversion.ListOptions) (runtime.Object, error)
List implements rest.Lister interface
func (*NodeMetrics) NamespaceScoped ¶
func (m *NodeMetrics) NamespaceScoped() bool
NamespaceScoped implements rest.Scoper interface
func (*NodeMetrics) New ¶
func (m *NodeMetrics) New() runtime.Object
New implements rest.Storage interface
func (*NodeMetrics) NewList ¶
func (m *NodeMetrics) NewList() runtime.Object
NewList implements rest.Lister interface
type NodeMetricsGetter ¶
type NodeMetricsGetter interface { // GetNodeMetrics gets the latest metrics for the given nodes, // returning both the metrics and the associated collection timestamp. GetNodeMetrics(nodes ...*corev1.Node) ([]metrics.NodeMetrics, error) }
NodeMetricsGetter knows how to fetch metrics for a node.
type PodMetrics ¶
type PodMetrics struct {
// contains filtered or unexported fields
}
func NewPodMetrics ¶
func NewPodMetrics(groupResource schema.GroupResource, metrics PodMetricsGetter, podLister cache.GenericLister) *PodMetrics
func (*PodMetrics) ConvertToTable ¶
func (m *PodMetrics) ConvertToTable(ctx context.Context, object runtime.Object, tableOptions runtime.Object) (*metav1beta1.Table, error)
ConvertToTable implements rest.TableConvertor interface
func (*PodMetrics) Destroy ¶
func (m *PodMetrics) Destroy()
Destroy implements rest.Storage interface
func (*PodMetrics) Get ¶
func (m *PodMetrics) Get(ctx context.Context, name string, opts *metav1.GetOptions) (runtime.Object, error)
Get implements rest.Getter interface
func (*PodMetrics) Kind ¶
func (m *PodMetrics) Kind() string
Kind implements rest.KindProvider interface
func (*PodMetrics) List ¶
func (m *PodMetrics) List(ctx context.Context, options *metainternalversion.ListOptions) (runtime.Object, error)
List implements rest.Lister interface
func (*PodMetrics) NamespaceScoped ¶
func (m *PodMetrics) NamespaceScoped() bool
NamespaceScoped implements rest.Scoper interface
func (*PodMetrics) New ¶
func (m *PodMetrics) New() runtime.Object
New implements rest.Storage interface
func (*PodMetrics) NewList ¶
func (m *PodMetrics) NewList() runtime.Object
NewList implements rest.Lister interface
type PodMetricsGetter ¶
type PodMetricsGetter interface { // GetPodMetrics gets the latest metrics for all containers in each listed pod, // returning both the metrics and the associated collection timestamp. GetPodMetrics(pods ...*metav1.PartialObjectMetadata) ([]metrics.PodMetrics, error) }
PodMetricsGetter knows how to fetch metrics for the containers in a pod.