cli

package
v0.0.0-...-585c797 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2015 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DaemonAlias command aliases for daemon mode.
	DaemonAlias = "daemon, d"
	// DaemonFlag key for the daeomon parameter
	DaemonFlag = "daemon"
	// DriverFlag key for for the driver parameter.
	DriverFlag = "driver"
)

Variables

This section is empty.

Functions

func BlockVolumeCommands

func BlockVolumeCommands(name string) []cli.Command

BlockVolumeCommands exports CLI comamnds for a Block VolumeDriver.

func ClusterCommands

func ClusterCommands(name string) []cli.Command

ClusterCommands exports CLI comamnds for File VolumeDriver

func DaemonMode

func DaemonMode(c *cli.Context) bool

DaemonMode returns true if we are running as daemon

func DriverCommands

func DriverCommands() []cli.Command

DriverCommands exports the list of CLI driver subcommands.

func DriverName

func DriverName(c *cli.Context) string

DriverName as specified in the -<DriverFlag> parameter.

func FileVolumeCommands

func FileVolumeCommands(name string) []cli.Command

FileVolumeCommands exports CLI comamnds for File VolumeDriver

Types

type Format

type Format struct {
	Cmd    string      `json:"cmd,omitempty"`
	Status string      `json:"status,omitempty"`
	Err    string      `json:"error,omitempty"`
	Desc   string      `json:"desc,omitempty"`
	UUID   []string    `json:"uuid,omitempty"`
	Result interface{} `json:"result,omitempty"`
}

Format standardizes the screen output of commands.

type VolumeSzUnits

type VolumeSzUnits uint64

VolumeSzUnits number representing size units.

const (

	// KiB 1024 bytes
	KiB VolumeSzUnits = 1 << (10 * iota)
	// MiB 1024 KiB
	MiB
	// GiB 1024 MiB
	GiB
	// TiB 1024 GiB
	TiB
	// PiB 1024 PiB
	PiB
)

Jump to

Keyboard shortcuts

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