cmd

package
v0.0.0-...-fc7dab2 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CMD_NAME_BOOTSTRAP  = "bootstrap"
	CMD_NAME_VERSION    = "version"
	CMD_NAME_DB_MIGRATE = "db_migrate"
	CMD_NAME_RUN        = "run"
	CMD_NAME_JOIN       = "join"
	CMD_NAME_WEB_PROXY  = "proxy-cfg"
)

Variables

View Source
var (
	Options = struct {
		AppDir    string `long:"appdir" short:"d"`
		NodeId    uint   `long:"node-id" short:"n"`
		Bootstrap `command:"bootstrap"`
		DbMigrate `command:"db_migrate"`
		Run       `command:"run"`
		Join      `command:"join"`
		Version   `command:"version"`
	}{}
)

Functions

func BootstrapCmd

func BootstrapCmd(createDb bool, force bool, IdFromNic string, tags []string) error

func DbMigrateCmd

func DbMigrateCmd()

func JoinCmd

func JoinCmd(secret string, tags []string, hubAddr string) error

func RunCmd

func RunCmd() error

func ShowVersion

func ShowVersion(verbose []bool)

Types

type Bootstrap

type Bootstrap struct {
	Tags            []string `long:"tag"`
	IdFromInterface string   `long:"id-from-nic"`
	CreateDb        bool     `long:"create-db"`
	Force           bool     `long:"force"`
}

type DbMigrate

type DbMigrate struct {
	Drop bool `long:"drop" description:"Drop database before migration"`
}

type Join

type Join struct {
	Tags []string `long:"tag"`
	Hub  string   `long:"hub" required:"true"`
}

type Run

type Run struct {
	HubPort      int `long:"hub-port"`
	WebProxyPort int `long:"wp-port"`
}

type Version

type Version struct {
	Verbose []bool `short:"v" long:"verbose" description:""`
}

Jump to

Keyboard shortcuts

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