Documentation ¶
Overview ¶
Package discovery contains functionality to discover the type of etcd used in back up and restore operations as well as what Kubernetes distro is used.
Index ¶
- func CountKeysFor(endpoint string, distro types.KubernetesDistro) (int, int, error)
- func ProbeEtcd(endpoint string) (string, bool, error)
- func ProbeKubernetesDistro(endpoint string) (types.KubernetesDistro, error)
- func Visit2(kapi client.KeysAPI, path string, fn types.Reap) error
- func Visit3(c3 *clientv3.Client, path string, distro types.KubernetesDistro, fn types.Reap) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CountKeysFor ¶
CountKeysFor iterates over well-known keys of a given Kubernetes distro and returns the number of keys and their values total size, in the respective key range/subtree. Example:
numkeys, totalsize, err := discovery.Walk4Stats("http://localhost:2379", types.OpenShift)
func ProbeEtcd ¶
ProbeEtcd probes an endpoint at path /version to figure which version of etcd it is and in which mode (secure or insecure) it is used. Example:
version, secure, err := ProbeEtcd("http://localhost:2379")
func ProbeKubernetesDistro ¶
func ProbeKubernetesDistro(endpoint string) (types.KubernetesDistro, error)
ProbeKubernetesDistro probes an etcd cluster for which Kubernetes distribution is present by scanning the available keys. Example:
distro, err := ProbeKubernetesDistro("http://localhost:2379")
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.