Documentation
¶
Index ¶
- func Confirm() (bool, error)
- func ExpandCommaSeparatedValues(values []string) []string
- type AddMachineOptions
- type CLI
- func (cli *CLI) AddMachine(ctx context.Context, opts AddMachineOptions) (*client.Client, error)
- func (cli *CLI) ConnectCluster(ctx context.Context, contextName string) (*client.Client, error)
- func (cli *CLI) CreateContext(name string) error
- func (cli *CLI) InitCluster(ctx context.Context, opts InitClusterOptions) (*client.Client, error)
- func (cli *CLI) ProgressOut() *streams.Out
- func (cli *CLI) SetCurrentContext(name string) error
- type InitClusterOptions
- type RemoteMachine
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExpandCommaSeparatedValues ¶ added in v0.6.0
ExpandCommaSeparatedValues takes a slice of strings and expands any comma-separated values into individual elements.
Types ¶
type AddMachineOptions ¶ added in v0.7.0
type CLI ¶
func New ¶
func New(configPath string, conn *config.MachineConnection) (*CLI, error)
New creates a new CLI instance with the given config path or remote machine connection. If the connection is provided, the config is ignored for all operations which is useful for interacting with a cluster without creating a config.
func (*CLI) AddMachine ¶
AddMachine provisions a remote machine and adds it to the cluster. It returns a client to interact with the machine which should be closed after use by the caller.
func (*CLI) ConnectCluster ¶
ConnectCluster connects to a cluster using the given context name or the current context if not specified. If the CLI was initialised with a machine connection, the config is ignored and the connection is used instead.
func (*CLI) CreateContext ¶ added in v0.6.0
func (*CLI) InitCluster ¶
InitCluster initialises a new cluster on a remote machine and returns a client to interact with the cluster. The client should be closed after use by the caller.
func (*CLI) ProgressOut ¶
ProgressOut returns an output stream for progress writer.