Documentation ¶
Index ¶
- Constants
- func BytesToFile(path, name string, data []byte) error
- func CreateBasic(serverURL, userName, clusterName string, caCert []byte) *clientcmdapi.Config
- func CreateWithCerts(serverURL, userName, clusterName string, caCert []byte, clientKey []byte, ...) *clientcmdapi.Config
- func DeCompress(file, targetPath string) error
- func DownloadFile(url, filePath string) error
- func FileToBytes(path, name string) ([]byte, error)
- func FlagsDNS(dns string) []string
- func FlagsIP(ip string) []net.IP
- func GenExamples(path, parentCommand string)
- func InternetIP() (net.IP, error)
- func IsExist(path string) bool
- func ListFiles(path string) []string
- func MapToString(labels map[string]string) string
- func NewAPIRegistrationClient(c *rest.Config) (*aggregator.Clientset, error)
- func NewCRDsClient(c *rest.Config) (*clientset.Clientset, error)
- func NewClientSet(c *rest.Config) (*kubernetes.Clientset, error)
- func ParseIP(s string) (net.IP, int, error)
- func RestConfig(kubeconfigPath string) (*rest.Config, error)
- func StaticYamlToJSONByte(staticYaml string) []byte
- func StringToMap(labels string) map[string]string
- func StringToNetIP(addr string) net.IP
- func WriteKubeConfigFromSpec(serverURL, userName, clusterName, kubeconfigPath, kubeconfigName string, ...) error
- type Downloader
Constants ¶
View Source
const ( // MaxRespBodyLength is the max length of http response body MaxRespBodyLength = 1 << 20 // 1 MiB )
Variables ¶
This section is empty.
Functions ¶
func BytesToFile ¶
BytesToFile Bytes Conversion File
func CreateBasic ¶
func CreateBasic(serverURL, userName, clusterName string, caCert []byte) *clientcmdapi.Config
CreateBasic creates a basic, general KubeConfig object that then can be extended
func CreateWithCerts ¶
func CreateWithCerts(serverURL, userName, clusterName string, caCert []byte, clientKey []byte, clientCert []byte) *clientcmdapi.Config
CreateWithCerts creates a KubeConfig object with access to the API server with client certificates
func DownloadFile ¶
DownloadFile Download files via URL
func FileToBytes ¶
FileToBytes File Conversion Bytes
func NewAPIRegistrationClient ¶
func NewAPIRegistrationClient(c *rest.Config) (*aggregator.Clientset, error)
NewAPIRegistrationClient apiregistration ClientSet
func NewCRDsClient ¶
NewCRDsClient clientset ClientSet
func NewClientSet ¶
func NewClientSet(c *rest.Config) (*kubernetes.Clientset, error)
NewClientSet Kubernetes ClientSet
func ParseIP ¶ added in v1.1.5
ParseIP parse an ip address and return whether it is a v4 or v6 ip address
func RestConfig ¶
RestConfig Kubernetes kubeconfig
func StaticYamlToJSONByte ¶
StaticYamlToJSONByte Static yaml file conversion JSON Byte
Types ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.