Package util contains various helper functions for ReShifter.
CACertFromEnv loads the CA cert filepath from the respective environment variable RS_ETCD_CA_CERT.
Certsdir returns the absolute path to the directory where the pre-generated certs and keys are.
ClientCertAndKeyFromEnv loads the client cert and key filepaths from the respective environment variables RS_ETCD_CLIENT_CERT and RS_ETCD_CLIENT_KEY.
EtcdDown tears down an etcd server.
ExternalIP retrieves the public IP of the host ReShifter is running on, adapted from: https://stackoverflow.com/questions/23558425/how-do-i-get-the-local-ip-address-in-go
IsBackupID tests if a string is a valid backup ID. A valid backup ID is a 10 digit integer, representing a Unix timestamp, for example, 1499588813.
LaunchEtcd2 launches etcd in v2 on port, either in secure or in insecure mode, depending on the scheme used in tetcd.
LaunchEtcd3 launches etcd in v3 on port, either in secure or in insecure mode, depending on the scheme used in tetcd.
LookupDistro returns a textual description for a Kube distro by type.
NewClient2 creates an etcd2 client, optionally using SSL/TLS if secure is true. The endpoint is an URL such as http://localhost:2379.
NewClient3 creates an etcd3 client, optionally using SSL/TLS if secure is true. The endpoint is an URL such as http://localhost:2379.
S3CredFromEnv loads S3 access key and secret from the respective environment variable ACCESS_KEY_ID and SECRET_ACCESS_KEY.
SetKV2 sets the key with val in an etcd2 cluster and iff val is empty, creates a directory key.