command

package
v0.0.0-...-174afc0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2017 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FlagSetFlags

type FlagSetFlags uint

FlagSetFlags is an enum to define what flags are present in the default FlagSet returned by Meta.FlagSet.

const (
	// FlagSetNone sets FlagSetFlags to 0
	FlagSetNone FlagSetFlags = 0
	// FlagSetClient sets FlagSetFlags to 1 and varies
	FlagSetClient FlagSetFlags = 1 << iota
	// FlagSetDefault sets default value
	FlagSetDefault = FlagSetClient
)

type Meta

type Meta struct {
	Ui cli.Ui
	// contains filtered or unexported fields
}

Meta contains the meta-options and functionality that nearly every Maya server command inherits.

func (*Meta) Colorize

func (m *Meta) Colorize() *colorstring.Colorize

Colorize returns all the including fields.

func (*Meta) FlagSet

func (m *Meta) FlagSet(n string, fs FlagSetFlags) *flag.FlagSet

FlagSet returns a FlagSet with the common flags that every command implements. The exact behavior of FlagSet can be configured using the flags as the second parameter, for example to disable server settings on the commands that don't talk to a server.

type UpCommand

type UpCommand struct {
	Revision          string
	Version           string
	VersionPrerelease string
	Ui                cli.Ui
	ShutdownCh        <-chan struct{}
	// contains filtered or unexported fields
}

UpCommand is a cli implementation that runs a Maya server. The command will not end unless a shutdown message is sent on the ShutdownCh. If two messages are sent on the ShutdownCh it will forcibly exit.

func (*UpCommand) Help

func (c *UpCommand) Help() string

Help returns the various help tags and other options.

func (*UpCommand) Run

func (c *UpCommand) Run(args []string) int

Run does tasks related to mayaserver.

func (*UpCommand) Synopsis

func (c *UpCommand) Synopsis() string

Synopsis returns that maya api server started

type VersionCommand

type VersionCommand struct {
	Revision          string
	Version           string
	VersionPrerelease string
	Ui                cli.Ui
}

VersionCommand is a cli implementation that prints the version.

func (*VersionCommand) Help

func (c *VersionCommand) Help() string

Help returns empty string

func (*VersionCommand) Run

func (c *VersionCommand) Run(_ []string) int

Run displays the m-apiserver version details

func (*VersionCommand) Synopsis

func (c *VersionCommand) Synopsis() string

Synopsis return string

Jump to

Keyboard shortcuts

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