k8sclient

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2021 License: AGPL-3.0 Imports: 8 Imported by: 2

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 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