util

package
v2.13.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateCustomResourceClients

func CreateCustomResourceClients(apiserver string, kubeconfig string, factories ...customresource.RegistryFactory) (map[string]interface{}, error)

CreateCustomResourceClients creates a custom resource clientset.

func CreateDiscoveryClient

func CreateDiscoveryClient(apiserver string, kubeconfig string) (*discovery.DiscoveryClient, error)

CreateDiscoveryClient creates a Kubernetes discovery client.

func CreateDynamicClient

func CreateDynamicClient(apiserver string, kubeconfig string) (*dynamic.DynamicClient, error)

CreateDynamicClient creates a Kubernetes dynamic client.

func CreateKubeClient

func CreateKubeClient(apiserver string, kubeconfig string) (clientset.Interface, error)

CreateKubeClient creates a Kubernetes clientset and a custom resource clientset.

func GVRFromType

func GVRFromType(resourceName string, expectedType interface{}) *schema.GroupVersionResource

GVRFromType returns the GroupVersionResource for a given type.

func GatherAndCount added in v2.13.0

func GatherAndCount(g prometheus.Gatherer) (int, error)

GatherAndCount gathers all metrics from the provided Gatherer and counts them. It returns the number of metric children in all gathered metric families together.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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