k8sclient

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2022 License: Apache-2.0 Imports: 8 Imported by: 2 modules, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRestConfig

func GetRestConfig(clusterName string) (*rest.Config, error)

GetRestConfig get rest config with clusterName

Types

type K8sClient

type K8sClient struct {
	ClientSet *kubernetes.Clientset
	CRClient  client.Client
}

func New

func New(clusterName string) (*K8sClient, error)

New new K8sClient with clusterName.

func NewForInCluster added in v1.5.0

func NewForInCluster() (*K8sClient, error)

NewForInCluster New client for in cluster

func NewForRestConfig

func NewForRestConfig(c *rest.Config, schemes ...func(scheme *runtime.Scheme) error) (*K8sClient, error)

NewForRestConfig new K8sClient with rest.Config, you can register your custom runtime.Scheme.

func NewWithTimeOut

func NewWithTimeOut(clusterName string, timeout time.Duration) (*K8sClient, error)

NewWithTimeOut new k8sClient with timeout

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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