lib

package
v0.0.0-...-b7948c7 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2017 License: AGPL-3.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CLI

func CLI(program, version string, flags Flags) error

CLI is the entry point for using mgmt normally from the CLI.

Types

type Flags

type Flags struct {
	Debug   bool // add additional log messages
	Trace   bool // add execution flow log messages
	Verbose bool // add extra log message output
}

Flags are some constant flags which are used throughout the program.

type Main

type Main struct {
	Program string // the name of this program, usually set at compile time
	Version string // the version of this program, usually set at compile time

	Flags Flags // static global flags that are set at compile time

	Hostname *string // hostname to use; nil if undefined

	Prefix         *string // prefix passed in; nil if undefined
	TmpPrefix      bool    // request a pseudo-random, temporary prefix to be used
	AllowTmpPrefix bool    // allow creation of a new temporary prefix if main prefix is unavailable

	GAPI    gapi.GAPI // graph API interface struct
	Remotes []string  // list of remote graph definitions to run

	NoWatch          bool   // do not update graph on watched graph definition file changes
	Noop             bool   // globally force all resources into no-op mode
	Graphviz         string // output file for graphviz data
	GraphvizFilter   string // graphviz filter to use
	ConvergedTimeout int    // exit after approximately this many seconds in a converged state; -1 to disable
	MaxRuntime       uint   // exit after a maximum of approximately this many seconds

	Seeds            []string // default etc client endpoint
	ClientURLs       []string // list of URLs to listen on for client traffic
	ServerURLs       []string // list of URLs to listen on for server (peer) traffic
	IdealClusterSize int      // ideal number of server peers in cluster; only read by initial server
	NoServer         bool     // do not let other servers peer with me

	CConns           uint16 // number of maximum concurrent remote ssh connections to run, 0 for unlimited
	AllowInteractive bool   // allow interactive prompting, such as for remote passwords
	SSHPrivIDRsa     string // default path to ssh key file, set empty to never touch
	NoCaching        bool   // don't allow remote caching of remote execution binary
	Depth            uint16 // depth in remote hierarchy; for internal use only

	NoPgp       bool    // disallow pgp functionality
	PgpKeyPath  *string // import a pre-made key pair
	PgpIdentity *string

	Prometheus       bool   // enable prometheus metrics
	PrometheusListen string // prometheus instance bind specification
	// contains filtered or unexported fields
}

Main is the main struct for running the mgmt logic.

func (*Main) Exit

func (obj *Main) Exit(err error)

Exit causes a safe shutdown. This is often attached to the ^C signal handler.

func (*Main) Init

func (obj *Main) Init() error

Init initializes the main struct after it performs some validation.

func (*Main) Run

func (obj *Main) Run() error

Run is the main execution entrypoint to run mgmt.

Jump to

Keyboard shortcuts

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