util

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 7, 2016 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultOpenShiftDirectory = "/var/lib/minishift"
	DefaultCertPath           = DefaultOpenShiftDirectory + "/openshift.local.config/master/"
	DefaultServiceClusterIP   = "10.0.0.1"
	DefaultDNSDomain          = "cluster.local"
	DefaultDNSIP              = "10.0.0.10"
)

These constants are used by both minikube and openshift

Variables

This section is empty.

Functions

func CanReadFile

func CanReadFile(path string) bool

If the file represented by path exists and readable, return true otherwise return false.

func GenerateSelfSignedCert

func GenerateSelfSignedCert(certPath, keyPath string, ips []net.IP, alternateDNS []string) error

You may also specify additional subject alt names (either ip or dns names) for the certificate The certificate will be created with file mode 0644. The key will be created with file mode 0600. If the certificate or key files already exist, they will be overwritten. Any parent directories of the certPath or keyPath will be created as needed with file mode 0755.

func GetAlternateDNS

func GetAlternateDNS(domain string) []string

func Pad

func Pad(str string) string

func Retry

func Retry(attempts int, callback func() error) (err error)

func RetryAfter

func RetryAfter(attempts int, callback func() error, d time.Duration) (err error)

func Until

func Until(fn func() error, w io.Writer, name string, sleep time.Duration, done <-chan struct{})

Until endlessly loops the provided function until a message is received on the done channel. The function will wait the duration provided in sleep between function calls. Errors will be sent on provider Writer.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL