k8sclient

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type K8sClient

type K8sClient struct {
	// contains filtered or unexported fields
}

K8sClient is a struct containing config, clientset, logger and metricsController

func NewK8sClient

func NewK8sClient(config *config.K8sConfig, logger *logger.Logger) (*K8sClient, error)

NewK8sClient is a function which takes a config and a logger and returns a K8sClient

func (*K8sClient) GetComponentStatus

func (k *K8sClient) GetComponentStatus(overallHealth *int, kubeAPIHealth *int)

GetComponentStatus is a method for the K8sClient struct that fetches the components status and calls the AddComponentsMetricsEntry method to add the metrics to a MetricsPoint

func (*K8sClient) GetEndpointStatus

func (k *K8sClient) GetEndpointStatus(kubeAPIHealth *int)

GetEndpointStatus is a method for the K8sClient struct that fetches the endpoints status and calls the AddSimpleMetricsEntry method to add the metrics to a MetricsPoint

func (*K8sClient) GetMetrics

func (k *K8sClient) GetMetrics() *metrics.Collector

GetMetrics is am method for the K8sClient struct that returns the K8sClient metricsCollector

func (*K8sClient) GetNodeStatus

func (k *K8sClient) GetNodeStatus(overallHealth *int, kubeAPIHealth *int)

GetNodeStatus is a method for the K8sClient struct that fetches the node status and calls the AddNodesMetricsEntry method to add the metrics to a MetricsPoint

func (*K8sClient) SetKubeAPIAndOverallHealth

func (k *K8sClient) SetKubeAPIAndOverallHealth(overallHealth *int, kubeAPIHealth *int)

SetKubeAPIAndOverallHealth is a method for the K8sClient struct that calls the AddSimpleMetricsEntry method to add the metrics to a MetricsPoint

func (*K8sClient) StopTimer

func (k *K8sClient) StopTimer(startTime time.Time)

StopTimer is a method for the K8sClient struct that calculates the duration of rkm-oupost and calls the the AddSimpleMetricsEntry method to add the metrics to a MetricsPoint

Jump to

Keyboard shortcuts

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