Documentation ¶
Index ¶
- Constants
- func CanonicalKubernetesNameFromFriendlyName(friendlyName string) (string, error)
- type Kubectl
- type KubernetesApi
- type MockKubeApi
- type MockKubectl
- func (m *MockKubectl) ProxyPort() int
- func (m *MockKubectl) SelfCheck() []*healthcheckPb.CheckResult
- func (m *MockKubectl) StartProxy(potentialErrorWhenStartingProxy chan error, port int) error
- func (m *MockKubectl) UrlFor(namespace string, extraPathStartingWithSlash string) (*url.URL, error)
- func (m *MockKubectl) Version() ([3]int, error)
Constants ¶
View Source
const ( KubeapiSubsystemName = "kubernetes-api" KubeapiClientCheckDescription = "can initialize the client" KubeapiAccessCheckDescription = "can query the Kubernetes API" )
View Source
const ( KubernetesDeployments = "deployments" KubernetesPods = "pods" KubectlSubsystemName = "kubectl" KubectlIsInstalledCheckDescription = "is in $PATH" KubectlVersionCheckDescription = "has compatible version" KubectlConnectivityCheckDescription = "can talk to Kubernetes cluster" )
Variables ¶
This section is empty.
Functions ¶
func CanonicalKubernetesNameFromFriendlyName ¶
CanonicalKubernetesNameFromFriendlyName returns a canonical name from common shorthands used in command line tools. This works based on https://github.com/kubernetes/kubernetes/blob/63ffb1995b292be0a1e9ebde6216b83fc79dd988/pkg/kubectl/kubectl.go#L39
Types ¶
type Kubectl ¶
type KubernetesApi ¶
type KubernetesApi interface { UrlFor(namespace string, extraPathStartingWithSlash string) (*url.URL, error) NewClient() (*http.Client, error) healthcheck.StatusChecker }
type MockKubeApi ¶
type MockKubeApi struct { SelfCheckResultsToReturn []*healthcheckPb.CheckResult UrlForNamespaceReceived string UrlExtraPathStartingWithSlashReceived string UrlForUrlToReturn *url.URL NewClientClientToReturn *http.Client ErrorToReturn error }
func (*MockKubeApi) SelfCheck ¶
func (m *MockKubeApi) SelfCheck() []*healthcheckPb.CheckResult
type MockKubectl ¶
type MockKubectl struct {
SelfCheckResultsToReturn []*healthcheckPb.CheckResult
}
func (*MockKubectl) ProxyPort ¶
func (m *MockKubectl) ProxyPort() int
func (*MockKubectl) SelfCheck ¶
func (m *MockKubectl) SelfCheck() []*healthcheckPb.CheckResult
func (*MockKubectl) StartProxy ¶
func (m *MockKubectl) StartProxy(potentialErrorWhenStartingProxy chan error, port int) error
func (*MockKubectl) Version ¶
func (m *MockKubectl) Version() ([3]int, error)
Click to show internal directories.
Click to hide internal directories.