metrics

package
v0.0.0-...-6cc5b44 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 15, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Claim

type Claim struct {
	Name      string `json:"name"`
	Namespace string `json:"namespace"`
}

type ClusterInfo

type ClusterInfo struct {
	Resources []NodeResources     `json:"resources"`
	Usage     []NodeMetrics       `json:"usage"`
	Volumes   []PersistentVolumes `json:"persistentVolumes"`
}

type Logger

type Logger interface {
	Start(ctx context.Context) error
}

func NewMetricsLogger

func NewMetricsLogger(
	resourcesClientset kubernetes.Interface,
	metricsClientset clientset.Interface,
	loggingTimeInterval time.Duration) Logger

type MetricsClientsetInterface

type MetricsClientsetInterface interface {
	clientset.Interface
}

type MetricsFetcher

type MetricsFetcher interface {
	FetchNodeMetrics() ([]NodeMetrics, error)
}

type MetricsV1beta1Interface

type MetricsV1beta1Interface interface {
	v1beta1.MetricsV1beta1Interface
}

type NodeCapacity

type NodeCapacity struct {
	CPU              string `json:"cpu"`
	EphemeralStorage string `json:"ephemeralStorage"`
	Memory           string `json:"memory"`
	Pods             string `json:"pods"`
}

type NodeMetrics

type NodeMetrics struct {
	Name                     string    `json:"nodeName"`
	StartCollectingTimestamp time.Time `json:"startCollectingTimestamp"`
	Usage                    NodeUsage `json:"usage"`
}

type NodeMetricsInterface

type NodeMetricsInterface interface {
	v1beta1.NodeMetricsInterface
}

type NodeResources

type NodeResources struct {
	Name         string       `json:"nodeName"`
	InstanceType string       `json:"instanceType"`
	Capacity     NodeCapacity `json:"capacity"`
}

type NodeUsage

type NodeUsage struct {
	CPU    string `json:"cpu"`
	Memory string `json:"memory"`

	// Deprecated: It's always set to 0.
	EphemeralStorage string `json:"ephemeralStorage"`
	// Deprecated: It's always set to 0.
	Pods string `json:"pods"`
}

type PersistentVolumes

type PersistentVolumes struct {
	Name     string `json:"name"`
	Capacity string `json:"capacity"`
	Claim    *Claim `json:"claim,omitempty"`
}

type ResourcesFetcher

type ResourcesFetcher interface {
	FetchNodesResources() ([]NodeResources, error)
}

type VolumesFetcher

type VolumesFetcher interface {
	FetchPersistentVolumesCapacity() ([]PersistentVolumes, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL