run

package
v1.2.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: May 13, 2019 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckClusterName added in v1.1.0

func CheckClusterName(name string) error

CheckClusterName ensures that a cluster name is also a valid host name according to RFC 1123. We further restrict the length of the cluster name to maximum 'clusterNameMaxSize' so that we can construct the host names based on the cluster name, and still stay within the 64 characters limit.

func CheckTools

func CheckTools(c *cli.Context) error

CheckTools checks if the docker API server is responding

func CreateCluster

func CreateCluster(c *cli.Context) error

CreateCluster creates a new single-node cluster container and initializes the cluster directory

func DeleteCluster

func DeleteCluster(c *cli.Context) error

DeleteCluster removes the containers belonging to a cluster and its local directory

func GenerateRandomString added in v1.0.0

func GenerateRandomString(n int) string

GenerateRandomString thanks to https://stackoverflow.com/a/31832326/6450189 GenerateRandomString is used to generate a random string that is used as a cluster secret

func GetKubeConfig

func GetKubeConfig(c *cli.Context) error

GetKubeConfig grabs the kubeconfig from the running cluster and prints the path to stdout

func ListClusters

func ListClusters(c *cli.Context) error

ListClusters prints a list of created clusters

func StartCluster

func StartCluster(c *cli.Context) error

StartCluster starts a stopped cluster container

func StopCluster

func StopCluster(c *cli.Context) error

StopCluster stops a running cluster container (restartable)

Types

type PublishedPorts added in v1.2.0

type PublishedPorts struct {
	ExposedPorts map[nat.Port]struct{}
	PortBindings map[nat.Port][]nat.PortBinding
}

func (*PublishedPorts) AddPort added in v1.2.0

func (p *PublishedPorts) AddPort(portSpec string) (*PublishedPorts, error)

Create a new PublishedPort struct with one more port, based on 'portSpec'

func (PublishedPorts) Offset added in v1.2.0

func (p PublishedPorts) Offset(offset int) *PublishedPorts

Create a new PublishedPort structure, with all host ports are changed by a fixed 'offset'

Jump to

Keyboard shortcuts

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