tools

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2017 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EtcdToken

func EtcdToken(quorumCount int) (string, error)

EtcdToken takes quorumCount and returns a valid etcd bootstrap token:

func ExecutePipeline

func ExecutePipeline(cmd1, cmd2 *exec.Cmd) ([]byte, error)

ExecutePipeline takes two commands and pipes the stdout of the first one into the stdin of the second one. Returns the output as []byte.

func LoadState

func LoadState(clusterID string) ([]byte, error)

LoadState reads the current ClusterID state file and decodes its content into a data structure:

func OffsetIP

func OffsetIP(cidr string, offset int) string

OffsetIP takes a CIDR and an offset and returns the IP address at the offset position starting at the beginning of the CIDR's subnet:

Types

This section is empty.

Jump to

Keyboard shortcuts

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