Documentation ¶
Index ¶
- Constants
- func CurrentCluster(config *api.Config) (string, *api.Cluster)
- func CurrentContext(config *api.Config) *api.Context
- func CurrentNamespace(config *api.Config) string
- func CurrentServer(config *api.Config) string
- func LoadConfig() (*api.Config, *clientcmd.PathOptions, error)
- func Server(config *api.Config, context *api.Context) string
- type Kuber
- type Tracer
Constants ¶
View Source
const ( // DefaultNamespace the standard namespace. DefaultNamespace = "default" // PodNamespaceFile the file path and name for pod namespace. PodNamespaceFile = "/var/run/secrets/kubernetes.io/serviceaccount/namespace" )
Variables ¶
This section is empty.
Functions ¶
func CurrentCluster ¶
CurrentCluster returns the current cluster.
func CurrentContext ¶
CurrentContext returns the current context.
func CurrentNamespace ¶
CurrentNamespace returns the current namespace in the context.
func CurrentServer ¶
CurrentServer returns the current context's server.
func LoadConfig ¶
func LoadConfig() (*api.Config, *clientcmd.PathOptions, error)
LoadConfig loads the Kubernetes configuration.
Types ¶
type Kuber ¶
type Kuber interface { SetKubeContext(string, *api.Config) (*api.Config, error) SetKubeNamespace(string, *api.Config) (*api.Config, error) SetKubeConfig(*api.Config) (*api.Config, error) LoadAPIConfig() (*api.Config, error) LoadAPIConfigFromPath(string) (*api.Config, error) LoadClientConfig() (*rest.Config, error) GetCurrentContext(*api.Config) *api.Context GetCurrentNamespace(*api.Config) string }
type Tracer ¶
type Tracer struct {
http.RoundTripper
}
Tracer implements http.RoundTripper. It prints each request and response/error to os.Stderr.
Click to show internal directories.
Click to hide internal directories.