cmd

package
v0.0.0-...-7146f0c Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2016 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ClusterCmd = &cobra.Command{
	Use:   "cluster",
	Short: "cluster sub commands",
	Long: `A longer description that spans multiple lines and likely contains examples
and usage of using your command. For example:

Cobra is a CLI library for Go that empowers applications.
This application is a tool to generate the needed files
to quickly create a Cobra application.`,
	Run: func(cmd *cobra.Command, args []string) {

	},
}

clusterCmd represents the cluster command

View Source
var RootCmd = &cobra.Command{
	Use:   "belt",
	Short: "A machine provision utility for Docker cluster",
	Long:  `A machine provision utility for Docker cluster.`,
}

RootCmd represents the base command when called without any subcommands

Functions

func CacheIP

func CacheIP() map[string]string

func CheckDashboard

func CheckDashboard(node string) bool

func ClearSSHClient

func ClearSSHClient(ip string)

func DefineDB

func DefineDB(ip string, json []byte) error

func DefineDashboard

func DefineDashboard(ip string, json []byte) error

func DrainNodes

func DrainNodes(ip string, nodes []string) (string, error)

func Execute

func Execute()

Execute adds all child commands to the root command sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

func GetIP

func GetIP(node string) string

func GetPublicIP

func GetPublicIP(ips *digitalocean.Networks) string

func GetSSHClient

func GetSSHClient(ip string) (ssh.Client, error)

func InstallDashboard

func InstallDashboard(node string) error

func ListDroplets

func ListDroplets()

func PrintDroplets

func PrintDroplets(droplets []*digitalocean.Droplet)

func SwarmInit

func SwarmInit(ip string) (string, error)

func SwarmJoinAsMaster

func SwarmJoinAsMaster(ip string, prime string, token string) (string, error)

func SwarmJoinAsWorker

func SwarmJoinAsWorker(ip string, prime string, token string) (string, error)

func SwarmNodeList

func SwarmNodeList(ip string) ([]byte, error)

func SwarmToken

func SwarmToken(ip string, kind string) (string, error)

func SwarmUpdate

func SwarmUpdate(ip string, policy string) (string, error)

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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