client

package
v0.0.26 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2023 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 DiscoveryClient

type DiscoveryClient struct {
	Context context.Context
	// contains filtered or unexported fields
}

func NewDiscoveryClient

func NewDiscoveryClient(ctx context.Context, config *rest.Config) (*DiscoveryClient, error)

func (*DiscoveryClient) ResourcesForCluster

func (dc *DiscoveryClient) ResourcesForCluster(toObj ParseResult, exclude ExcludeFilter, errLog io.Writer) (map[string]interface{}, error)

Get the cluster level resources

func (*DiscoveryClient) ResourcesForNamespace

func (dc *DiscoveryClient) ResourcesForNamespace(toObj ParseResult, namespace string, exclude ExcludeFilter, errLog io.Writer) (map[string]interface{}, error)

func (*DiscoveryClient) SpecificResourcesForNamespace added in v0.0.12

func (dc *DiscoveryClient) SpecificResourcesForNamespace(toObj ParseResult, moduleName, namespace string, targetResource []string, errLog io.Writer) (map[string]interface{}, error)

Get extra resource/namespace and try to do specific filter with module name

type ExcludeFilter added in v0.0.5

type ExcludeFilter func(schema.GroupVersion, metav1.APIResource) bool

type KubernetesClient

type KubernetesClient struct {
	Context context.Context
	// contains filtered or unexported fields
}

func NewKubernetesClient

func NewKubernetesClient(ctx context.Context, config *rest.Config) (*KubernetesClient, error)

func (*KubernetesClient) CreateDaemonSets

func (k *KubernetesClient) CreateDaemonSets(namespace string, daemonSet *appsv1.DaemonSet) (*appsv1.DaemonSet, error)

func (*KubernetesClient) DeleteDaemonSets

func (k *KubernetesClient) DeleteDaemonSets(namespace, name string) error

func (*KubernetesClient) GetAllConfigMaps

func (k *KubernetesClient) GetAllConfigMaps(namespace string) (runtime.Object, error)

func (*KubernetesClient) GetAllCronJobsList

func (k *KubernetesClient) GetAllCronJobsList(namespace string) (runtime.Object, error)

func (*KubernetesClient) GetAllDaemonSetsList

func (k *KubernetesClient) GetAllDaemonSetsList(namespace string) (runtime.Object, error)

func (*KubernetesClient) GetAllDeploymentsList

func (k *KubernetesClient) GetAllDeploymentsList(namespace string) (runtime.Object, error)

func (*KubernetesClient) GetAllEventsList

func (k *KubernetesClient) GetAllEventsList(namespace string) (runtime.Object, error)

func (*KubernetesClient) GetAllJobsList

func (k *KubernetesClient) GetAllJobsList(namespace string) (runtime.Object, error)

func (*KubernetesClient) GetAllNodesList

func (k *KubernetesClient) GetAllNodesList() (runtime.Object, error)

func (*KubernetesClient) GetAllPodsList

func (k *KubernetesClient) GetAllPodsList(namespace string) (runtime.Object, error)

func (*KubernetesClient) GetAllServicesList

func (k *KubernetesClient) GetAllServicesList(namespace string) (runtime.Object, error)

func (*KubernetesClient) GetAllStatefulSetsList

func (k *KubernetesClient) GetAllStatefulSetsList(namespace string) (runtime.Object, error)

func (*KubernetesClient) GetAllVolumeAttachments

func (k *KubernetesClient) GetAllVolumeAttachments() (runtime.Object, error)

func (*KubernetesClient) GetDaemonSetBy added in v0.0.23

func (k *KubernetesClient) GetDaemonSetBy(namespace, name string) (*appsv1.DaemonSet, error)

func (*KubernetesClient) GetDeploymentsListByLabels

func (k *KubernetesClient) GetDeploymentsListByLabels(namespace, labels string) (*appsv1.DeploymentList, error)

func (*KubernetesClient) GetKubernetesVersion

func (k *KubernetesClient) GetKubernetesVersion() (*version.Info, error)

func (*KubernetesClient) GetNamespace

func (k *KubernetesClient) GetNamespace(namespace string) (*corev1.Namespace, error)

func (*KubernetesClient) GetNodeBy added in v0.0.23

func (k *KubernetesClient) GetNodeBy(name string) (*corev1.Node, error)

func (*KubernetesClient) GetNodesListByLabels

func (k *KubernetesClient) GetNodesListByLabels(labels string) (*corev1.NodeList, error)

func (*KubernetesClient) GetPodContainerLogRequest

func (k *KubernetesClient) GetPodContainerLogRequest(namespace, podName, containerName string) *rest.Request

func (*KubernetesClient) GetPodContainerPreviousLogRequest added in v0.0.26

func (k *KubernetesClient) GetPodContainerPreviousLogRequest(namespace, podName, containerName string) *rest.Request

func (*KubernetesClient) GetPodRestartCount added in v0.0.26

func (k *KubernetesClient) GetPodRestartCount(namespace, podName, containerName string) (int32, error)

func (*KubernetesClient) GetPodsListByLabels

func (k *KubernetesClient) GetPodsListByLabels(namespace string, labels string) (*corev1.PodList, error)

type MetricsClient

type MetricsClient struct {
	Context context.Context
	// contains filtered or unexported fields
}

func NewMetricsClient

func NewMetricsClient(ctx context.Context, config *rest.Config) (*MetricsClient, error)

func (*MetricsClient) GetAllNodeMetrics

func (c *MetricsClient) GetAllNodeMetrics() (runtime.Object, error)

func (*MetricsClient) GetAllPodMetrics

func (c *MetricsClient) GetAllPodMetrics(namespace string) (runtime.Object, error)

type ParseResult added in v0.0.12

type ParseResult func(b []byte, groupVersion, kind string, resources ...string) (interface{}, error)

Jump to

Keyboard shortcuts

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