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: 37 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Names of environment variables used to supply various
	// config options to the Nomad CLI.
	EnvNomadAddress = "NOMAD_ADDR"
	EnvNomadRegion  = "NOMAD_REGION"
)
View Source
const (
	InstallScriptsPath  string = "https://raw.githubusercontent.com/openebs/maya/master/scripts/"
	BootstrapScript     string = "install_bootstrap.sh"
	BootstrapScriptPath string = InstallScriptsPath + BootstrapScript
	MayaScriptsPath     string = "/etc/maya.d/scripts/"
	// Utility scripts
	GetPrivateIPScript string = MayaScriptsPath + "get_first_private_ip.sh"
	// Consul scripts
	InstallConsulScript     string = MayaScriptsPath + "install_consul.sh"
	SetConsulAsServerScript string = MayaScriptsPath + "set_consul_as_server.sh"
	SetConsulAsClientScript string = MayaScriptsPath + "set_consul_as_client.sh"
	StartConsulServerScript string = MayaScriptsPath + "start_consul_server.sh"
	StartConsulClientScript string = MayaScriptsPath + "start_consul_client.sh"
	// Nomad scripts
	InstallNomadScript     string = MayaScriptsPath + "install_nomad.sh"
	SetNomadAsServerScript string = MayaScriptsPath + "set_nomad_as_server.sh"
	SetNomadAsClientScript string = MayaScriptsPath + "set_nomad_as_client.sh"
	StartNomadServerScript string = MayaScriptsPath + "start_nomad_server.sh"
	StartNomadClientScript string = MayaScriptsPath + "start_nomad_client.sh"
	// Docker scripts
	InstallDockerScript string = MayaScriptsPath + "install_docker.sh"

	//MayaServer Scripts
	InstallMayaserverScript string = MayaScriptsPath + "install_mayaserver.sh"
	StartMayaServerScript   string = MayaScriptsPath + "start_mayaserver.sh"
	//flannel Scripts
	InstallFlannelScript string = MayaScriptsPath + "install_flannel.sh"
)

Install specific scripts, path etc

Variables

View Source
var ErrMissingCommand error = errors.New("missing command")
View Source
var (
	MaximumVolumeNameSize = 64
)

Functions

func Contains

func Contains(arr []string, val string) bool

func CreateAPIVsm

func CreateAPIVsm(vname string, size string) error

CreateAPIVsm to create the Vsm through a API call to m-apiserver

func DeleteVsm

func DeleteVsm(vname string) error

DeleteVsm to get delete Volume through a API call to m-apiserver

func Filter

func Filter(list []string, check func(string) bool) []string

func FormatList

func FormatList(in []string) string

func GetStatus

func GetStatus(address string, obj interface{}) (error, int)

GetStatus will return json response and statusCode

func GetVolDetails

func GetVolDetails(volName string, obj interface{}) error

getVolDetails gets response in json format of a volume from m-apiserver

func GetVolumeStats

func GetVolumeStats(address string, obj interface{}) (error, int)

GetStatus will return json response and statusCode

func GetVsm

func GetVsm(obj interface{}) error

func IsHeadDisk

func IsHeadDisk(diskName string) bool

func ListSnapshot

func ListSnapshot(name string) error

func ParseLabels

func ParseLabels(labels []string) (map[string]string, error)

func Parser

func Parser(body []byte, obj interface{}) error

func PrintValidationErrors

func PrintValidationErrors(errors []error)

PrintValidationErrors loops through the errors

func RestClient

func RestClient() ([]byte, error)

func Snapshot

func Snapshot(volname string, snapname string, labels map[string]string) (string, error)

func StatsOutput

func StatsOutput(c *VsmStatsCommand, annotations *Annotations, args []string, statusArray []string, stats1 VolumeStats, stats2 VolumeStats) error

StatsOutput will return error code if any otherwise return zero

func ValidVolumeName

func ValidVolumeName(name string) bool

func VsmListOutput

func VsmListOutput() error

Types

type Annotation

type Annotation struct {
	IQN    string `json:"Iqn"`
	Volume string `json:"Volume"`
	Portal string `json:"Portal"`
	Size   string `json:"Size"`
}

type Annotations

type Annotations struct {
	TargetPortal     string `json:"vsm.openebs.io/targetportals"`
	ClusterIP        string `json:"vsm.openebs.io/cluster-ips"`
	Iqn              string `json:"vsm.openebs.io/iqn"`
	ReplicaCount     string `json:"vsm.openebs.io/replica-count"`
	ControllerStatus string `json:"vsm.openebs.io/controller-status"`
	ReplicaStatus    string `json:"vsm.openebs.io/replica-status"`
	VolSize          string `json:"vsm.openebs.io/volume-size"`
	ControllerIP     string `json:"vsm.openebs.io/controller-ips"`
	//	VolAddr          string `json:"vsm.openebs.io/replica-ips"`
	Replicas string `json:"vsm.openebs.io/replica-ips"`
}

Annotations describes volume struct

func GetVolAnnotations

func GetVolAnnotations(volName string) (*Annotations, error)

GetVolAnnotations gets annotations of volume

func GetVolumeSpec

func GetVolumeSpec(volName string) (*Annotations, error)

type Config

type Config struct {
	Version float64 `json:"version"`
	Kind    string  `json:"kind"`
	Spec    struct {
		Provider string `json:"provider"`
		Bin      []struct {
			Name    string `json:"name"`
			Version string `json:"version"`
		} `json:"bin"`
	} `json:"spec"`
	Metadeta []struct {
		Role string `json:"role"`
	} `json:"metadeta"`
	Args []struct {
		Name string `json:"name"`
		Addr string `json:"addr"`
	} `json:"args"`
}

Config holds the configuration of maya

type ControllerClient

type ControllerClient struct {
	Address string
	Host    string
	// contains filtered or unexported fields
}

func NewControllerClient

func NewControllerClient(address string) (*ControllerClient, error)

NewControllerClient create the new replica client

func (*ControllerClient) ListReplicas

func (c *ControllerClient) ListReplicas(path string) ([]Replica, error)

func (*ControllerClient) RevertSnapshot

func (c *ControllerClient) RevertSnapshot(volname string, snapshot string) error

type DataFormatter

type DataFormatter interface {
	// TransformData should return transformed string data.
	TransformData(interface{}) (string, error)
}

DataFormatter is a transformer of the data.

func DataFormat

func DataFormat(format, tmpl string) (DataFormatter, error)

DataFormat returns the data formatter specified format.

type DiskInfo

type DiskInfo struct {
	Name        string   `json:"name"`
	Parent      string   `json:"parent"`
	Children    []string `json:"children"`
	Removed     bool     `json:"removed"`
	UserCreated bool     `json:"usercreated"`
	Created     string   `json:"created"`
	Size        string   `json:"size"`
}

type EvalStatusCommand

type EvalStatusCommand struct {
	Meta
}

func (*EvalStatusCommand) Help

func (c *EvalStatusCommand) Help() string

func (*EvalStatusCommand) Run

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

func (*EvalStatusCommand) Synopsis

func (c *EvalStatusCommand) Synopsis() string

type ExecCmdType

type ExecCmdType string

Main command that Maya will use internally

const (
	// Nomad is currently the underlying lib used by Maya
	// for VSM provisioning
	ExecNomad ExecCmdType = "nomad"

	// Kubernetes may be another lib that can be used
	// for VSM provisioning
	ExecKube ExecCmdType = "kubectl"

	// Will be used for unit testing purposes
	ExecTesting ExecCmdType = "nopes"
)

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    FlagSetFlags = 0
	FlagSetClient  FlagSetFlags = 1 << iota
	FlagSetDefault              = FlagSetClient
)

type InfoReplica

type InfoReplica struct {
	client.Resource
	Dirty           bool                `json:"dirty"`
	Rebuilding      bool                `json:"rebuilding"`
	Head            string              `json:"head"`
	Parent          string              `json:"parent"`
	Size            string              `json:"size"`
	SectorSize      int64               `json:"sectorSize"`
	State           string              `json:"state"`
	Chain           []string            `json:"chain"`
	Disks           map[string]DiskInfo `json:"disks"`
	RemainSnapshots int                 `json:"remainsnapshots"`
	RevisionCounter string              `json:"revisioncounter"`
}

type InstallCommand

type InstallCommand struct {
	// To control this CLI's display
	Ui cli.Ui

	// OS command to execute
	Cmd *exec.Cmd
}

type InstallMayaCommand

type InstallMayaCommand struct {
	// To control this CLI's display
	M Meta

	// OS command to execute
	Cmd *exec.Cmd
	// contains filtered or unexported fields
}

InstallMayaCommand is a command implementation struct to setup Master Node

func (*InstallMayaCommand) Help

func (c *InstallMayaCommand) Help() string

Help shows helpText for a particular CLI command

func (*InstallMayaCommand) Run

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

Run holds the flag values for CLI subcommands

func (*InstallMayaCommand) Synopsis

func (c *InstallMayaCommand) Synopsis() string

Synopsis shows short information related to CLI command

type InstallOpenEBSCommand

type InstallOpenEBSCommand struct {
	// To control this CLI's display
	M Meta

	// OS command to execute
	Cmd *exec.Cmd
	// contains filtered or unexported fields
}

InstallOpenEBSCommand is a command implementation struct

func (*InstallOpenEBSCommand) Help

func (c *InstallOpenEBSCommand) Help() string

Help shows helpText for a particular CLI command

func (*InstallOpenEBSCommand) Run

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

Run holds the flag values for CLI subcommands

func (*InstallOpenEBSCommand) Synopsis

func (c *InstallOpenEBSCommand) Synopsis() string

Synopsis shows short information related to CLI command

type Installer

type Installer interface {
	Install() int
}

type InternalCommand

type InternalCommand struct {
	Cmd *exec.Cmd
	Ui  cli.Ui
}

func (*InternalCommand) Execute

func (ic *InternalCommand) Execute(capturer ...*string) int

This executes the provided OS command (`assuming the command to be available where this binary is running`). It returns 0 or 1 depending on successful or failure in execution. NOTE: It will return the exit code of the internal command if available

type JSONFormat

type JSONFormat struct {
}

func (*JSONFormat) TransformData

func (p *JSONFormat) TransformData(data interface{}) (string, error)

TransformData returns JSON format string data.

type JobGetter

type JobGetter struct {
	// contains filtered or unexported fields
}

func (*JobGetter) ApiJob

func (j *JobGetter) ApiJob(jpath string) (*api.Job, error)

StructJob returns the Job struct from jobfile.

type LineLimitReader

type LineLimitReader struct {
	io.ReadCloser
	// contains filtered or unexported fields
}

LineLimitReader wraps another reader and provides `tail -n` like behavior. LineLimitReader buffers up to the searchLimit and returns `-n` number of lines. After those lines have been returned, LineLimitReader streams the underlying ReadCloser

func NewLineLimitReader

func NewLineLimitReader(r io.ReadCloser, lines, searchLimit int, timeLimit time.Duration) *LineLimitReader

NewLineLimitReader takes the ReadCloser to wrap, the number of lines to find searching backwards in the first searchLimit bytes. timeLimit can optionally be specified by passing a non-zero duration. When set, the search for the last n lines is aborted if no data has been read in the duration. This can be used to flush what is had if no extra data is being received. When used, the underlying reader must not block forever and must periodically unblock even when no data has been read.

func (*LineLimitReader) Read

func (l *LineLimitReader) Read(p []byte) (n int, err error)

type ListStub

type ListStub struct {
	Items []struct {
		Metadata struct {
			Annotations struct {
				BeJivaVolumeOpenebsIoCount   string `json:"vsm.openebs.io/replica-count"`
				BeJivaVolumeOpenebsIoVolSize string `json:"vsm.openebs.io/volume-size"`
				Iqn                          string `json:"vsm.openebs.io/iqn"`
				Targetportal                 string `json:"vsm.openebs.io/targetportals"`
			} `json:"annotations"`
			CreationTimestamp interface{} `json:"creationTimestamp"`
			Name              string      `json:"name"`
		} `json:"metadata"`
		Spec struct {
			AccessModes interface{} `json:"AccessModes"`
			Capacity    interface{} `json:"Capacity"`
			ClaimRef    interface{} `json:"ClaimRef"`
			OpenEBS     struct {
				VolumeID string `json:"volumeID"`
			} `json:"OpenEBS"`
			PersistentVolumeReclaimPolicy string `json:"PersistentVolumeReclaimPolicy"`
			StorageClassName              string `json:"StorageClassName"`
		} `json:"spec"`
		Status struct {
			Message string `json:"Message"`
			Phase   string `json:"Phase"`
			Reason  string `json:"Reason"`
		} `json:"status"`
	} `json:"items"`
	Metadata struct {
	} `json:"metadata"`
}

type MarkDiskAsRemovedInput

type MarkDiskAsRemovedInput struct {
	client.Resource
	Name string `json:"name"`
}

type MayaAsNomadInstaller

type MayaAsNomadInstaller struct {
	InstallCommand
	// contains filtered or unexported fields
}

func (*MayaAsNomadInstaller) Install

func (c *MayaAsNomadInstaller) Install() int

The public command

type Meta

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

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

func (*Meta) Client

func (m *Meta) Client() (*api.Client, error)

Client is used to initialize and return a new API client using the default command line arguments and env vars.

func (*Meta) Colorize

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

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 NetworkInstallCommand

type NetworkInstallCommand struct {
	// To control this CLI's display
	M Meta

	// OS command to execute
	Cmd *exec.Cmd
	// contains filtered or unexported fields
}

NetworkInstallCommand is a command implementation struct

func (*NetworkInstallCommand) Help

func (c *NetworkInstallCommand) Help() string

Help shows helpText for a particular CLI command

func (*NetworkInstallCommand) Run

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

Run holds the flag values for CLI subcommands

func (*NetworkInstallCommand) Synopsis

func (c *NetworkInstallCommand) Synopsis() string

Synopsis shows short information related to CLI command

type NodeStatusCommand

type NodeStatusCommand struct {
	Meta
	// contains filtered or unexported fields
}

NodeStatusCommand is a command implementation struct

func (*NodeStatusCommand) Help

func (c *NodeStatusCommand) Help() string

Help shows helpText for a particular CLI command

func (*NodeStatusCommand) Run

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

Run holds the flag values for CLI subcommands

func (*NodeStatusCommand) Synopsis

func (c *NodeStatusCommand) Synopsis() string

Synopsis shows short information related to CLI command

type Replica

type Replica struct {
	client.Resource
	Address string `json:"address"`
	Mode    string `json:"mode"`
}

type ReplicaClient

type ReplicaClient struct {
	Address   string
	SyncAgent string
	Host      string
	// contains filtered or unexported fields
}

ReplicaClient is Client structure

func NewReplicaClient

func NewReplicaClient(address string) (*ReplicaClient, error)

NewReplicaClient create the new replica client

func (*ReplicaClient) GetReplica

func (c *ReplicaClient) GetReplica() (InfoReplica, error)

func (*ReplicaClient) MarkDiskAsRemoved

func (c *ReplicaClient) MarkDiskAsRemoved(disk string) error

type ReplicaCollection

type ReplicaCollection struct {
	client.Collection
	Data []Replica `json:"data"`
}

type RevertInput

type RevertInput struct {
	client.Resource
	Name string `json:"name"`
}

type ServerMembersCommand

type ServerMembersCommand struct {
	Meta
	Cmd *exec.Cmd
}

ServerMembersCommand is basic struct for cli command

func (*ServerMembersCommand) Help

func (c *ServerMembersCommand) Help() string

Help is helper function

func (*ServerMembersCommand) Run

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

Run holds the flag values for CLI subcommands

func (*ServerMembersCommand) Synopsis

func (c *ServerMembersCommand) Synopsis() string

Synopsis shows short information related to CLI command

type SnapshotCommand

type SnapshotCommand struct {
}

SnapshotCommand is a Command implementation that just shows help for the subcommands nested below it.

func (*SnapshotCommand) Help

func (c *SnapshotCommand) Help() string

func (*SnapshotCommand) Run

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

func (*SnapshotCommand) Synopsis

func (c *SnapshotCommand) Synopsis() string

type SnapshotCreateCommand

type SnapshotCreateCommand struct {
	Meta
	Name   string
	Sname  string
	Labels map[string]string
}

func (*SnapshotCreateCommand) Help

func (c *SnapshotCreateCommand) Help() string

Help shows helpText for a particular CLI command

func (*SnapshotCreateCommand) Run

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

Run holds the flag values for CLI subcommands

func (*SnapshotCreateCommand) Synopsis

func (c *SnapshotCreateCommand) Synopsis() string

Synopsis shows short information related to CLI command

type SnapshotDeleteCommand

type SnapshotDeleteCommand struct {
	Meta
	Name  string
	Sname string
}

func (*SnapshotDeleteCommand) DeleteSnapshot

func (s *SnapshotDeleteCommand) DeleteSnapshot(volume string, snapshot string) error

func (*SnapshotDeleteCommand) Help

func (s *SnapshotDeleteCommand) Help() string

func (*SnapshotDeleteCommand) Run

func (s *SnapshotDeleteCommand) Run(args []string) int

func (*SnapshotDeleteCommand) Synopsis

func (s *SnapshotDeleteCommand) Synopsis() string

Synopsis shows short information related to CLI command

type SnapshotInput

type SnapshotInput struct {
	client.Resource
	Name        string            `json:"name"`
	UserCreated bool              `json:"usercreated"`
	Created     string            `json:"created"`
	Labels      map[string]string `json:"labels"`
}

type SnapshotListCommand

type SnapshotListCommand struct {
	Meta
	Name string
}

func (*SnapshotListCommand) Help

func (c *SnapshotListCommand) Help() string

func (*SnapshotListCommand) Run

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

func (*SnapshotListCommand) Synopsis

func (c *SnapshotListCommand) Synopsis() string

Synopsis shows short information related to CLI command

type SnapshotOutput

type SnapshotOutput struct {
	client.Resource
}

type SnapshotRevertCommand

type SnapshotRevertCommand struct {
	Meta
	Name  string
	Sname string
}

func (*SnapshotRevertCommand) Help

func (s *SnapshotRevertCommand) Help() string

func (*SnapshotRevertCommand) Run

func (s *SnapshotRevertCommand) Run(args []string) int

func (*SnapshotRevertCommand) Synopsis

func (s *SnapshotRevertCommand) Synopsis() string

Synopsis shows short information related to CLI command

type StatsArr

type StatsArr struct {
	IQN    string `json:"Iqn"`
	Volume string `json:"Volume"`
	Portal string `json:"Portal"`
	Size   string `json:"Size"`

	ReadIOPS  int64 `json:"ReadIOPS"`
	WriteIOPS int64 `json:"WriteIOPS"`

	ReadThroughput  float64 `json:"ReadThroughput"`
	WriteThroughput float64 `json:"WriteThroughput"`

	ReadLatency  float64 `json:"ReadLatency"`
	WriteLatency float64 `json:"WriteLatency"`

	AvgReadBlockSize  int64 `json:"AvgReadBlockSize"`
	AvgWriteBlockSize int64 `json:"AvgWriteBlockSize"`

	SectorSize  float64 `json:"SectorSize"`
	ActualUsed  float64 `json:"ActualUsed"`
	LogicalSize float64 `json:"LogicalSize"`
}

type Status

type Status struct {
	Resource        client.Resource
	ReplicaCounter  int64  `json:"replicacounter"`
	RevisionCounter string `json:"revisioncounter"`
}

type StringSlice

type StringSlice []string

StringSlice is an opaque type for []string to satisfy flag.Value

func (*StringSlice) Set

func (f *StringSlice) Set(value string) error

Set appends the string value to the list of values

func (*StringSlice) String

func (f *StringSlice) String() string

String returns a readable representation of this value (for usage defaults)

func (*StringSlice) Value

func (f *StringSlice) Value() []string

Value returns the slice of strings set by this flag

type SubCmdType

type SubCmdType string

Sub command that will be used with above main command

const (
	NomadRun    SubCmdType = "run"
	NomadStatus SubCmdType = "status"
	NomadPlan   SubCmdType = "plan"
)

Nomad specific commands

type TemplateFormat

type TemplateFormat struct {
	// contains filtered or unexported fields
}

func (*TemplateFormat) TransformData

func (p *TemplateFormat) TransformData(data interface{}) (string, error)

TransformData returns template format string data.

type VersionCommand

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

VersionCommand is a Command implementation prints the version.

func (*VersionCommand) Help

func (c *VersionCommand) Help() string

Help shows helpText for a particular CLI command

func (*VersionCommand) Run

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

Run holds the flag values for CLI subcommands

func (*VersionCommand) Synopsis

func (c *VersionCommand) Synopsis() string

Synopsis shows short information related to CLI command

type Volume

type Volume struct {
	Spec struct {
		AccessModes interface{} `json:"AccessModes"`
		Capacity    interface{} `json:"Capacity"`
		ClaimRef    interface{} `json:"ClaimRef"`
		OpenEBS     struct {
			VolumeID string `json:"volumeID"`
		} `json:"OpenEBS"`
		PersistentVolumeReclaimPolicy string `json:"PersistentVolumeReclaimPolicy"`
		StorageClassName              string `json:"StorageClassName"`
	} `json:"Spec"`

	Status struct {
		Message string `json:"Message"`
		Phase   string `json:"Phase"`
		Reason  string `json:"Reason"`
	} `json:"Status"`
	Metadata struct {
		Annotations       interface{} `json:"annotations"`
		CreationTimestamp interface{} `json:"creationTimestamp"`
		Name              string      `json:"name"`
	} `json:"metadata"`
}

Volume is a command implementation struct

type VolumeCollection

type VolumeCollection struct {
	client.Collection
	Data []Volumes `json:"data"`
}

type VolumeCommand

type VolumeCommand struct {
}

VolumeCommand is a Command implementation that just shows help for the subcommands nested below it.

func (*VolumeCommand) Help

func (c *VolumeCommand) Help() string

func (*VolumeCommand) Run

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

func (*VolumeCommand) Synopsis

func (c *VolumeCommand) Synopsis() string

type VolumeStats

type VolumeStats struct {
	Resource        client.Resource
	RevisionCounter int64         `json:"RevisionCounter"`
	ReplicaCounter  int64         `json:"ReplicaCounter"`
	SCSIIOCount     map[int]int64 `json:"SCSIIOCount"`

	ReadIOPS            string `json:"ReadIOPS"`
	TotalReadTime       string `json:"TotalReadTime"`
	TotalReadBlockCount string `json:"TotalReadBlockCount"`

	WriteIOPS            string `json:"WriteIOPS"`
	TotalWriteTime       string `json:"TotalWriteTime"`
	TotalWriteBlockCount string `json:"TotatWriteBlockCount"`

	SectorSize        string `json:"SectorSize"`
	UsedBlocks        string `json:"UsedBlocks"`
	UsedLogicalBlocks string `json:"UsedLogicalBlocks"`
}

type Volumes

type Volumes struct {
	client.Resource
	Name         string `json:"name"`
	ReplicaCount int    `json:"replicaCount"`
	Endpoint     string `json:"endpoint"`
}

func GetVolume

func GetVolume(path string) (*Volumes, error)

type VsmCreateCommand

type VsmCreateCommand struct {
	// To control this CLI's display
	Meta
	// OS command to execute; <optional>
	Cmd *exec.Cmd
	// contains filtered or unexported fields
}

VsmCreateCommand is a command implementation struct

func (*VsmCreateCommand) Help

func (c *VsmCreateCommand) Help() string

Help shows helpText for a particular CLI command

func (*VsmCreateCommand) Run

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

Run to get the flag values and start execution The logic of this function can be understood by understanding the help text defined earlier.

func (*VsmCreateCommand) Synopsis

func (c *VsmCreateCommand) Synopsis() string

Synopsis shows short information related to CLI command

type VsmListCommand

type VsmListCommand struct {
	Meta
	// contains filtered or unexported fields
}

VsmListCommand is a command implementation struct

func (*VsmListCommand) Help

func (c *VsmListCommand) Help() string

Help shows helpText for a particular CLI command

func (*VsmListCommand) Run

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

Run holds the flag values for CLI subcommands

func (*VsmListCommand) Synopsis

func (c *VsmListCommand) Synopsis() string

Synopsis shows short information related to CLI command

type VsmStatsCommand

type VsmStatsCommand struct {
	Meta
	Address     string
	Host        string
	Length      int
	Replica_ips string
	Json        string
}

VsmStatsCommand is a command implementation struct

func (*VsmStatsCommand) Help

func (c *VsmStatsCommand) Help() string

Help shows helpText for a particular CLI command

func (*VsmStatsCommand) Run

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

Run holds the flag values for CLI subcommands

func (*VsmStatsCommand) Synopsis

func (c *VsmStatsCommand) Synopsis() string

Synopsis shows short information related to CLI command

type VsmStopCommand

type VsmStopCommand struct {
	Meta
	// contains filtered or unexported fields
}

VsmStopCommand is a command implementation struct

func (*VsmStopCommand) Help

func (c *VsmStopCommand) Help() string

Help shows helpText for a particular CLI command

func (*VsmStopCommand) Run

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

Run holds the flag values for CLI subcommands

func (*VsmStopCommand) Synopsis

func (c *VsmStopCommand) Synopsis() string

Synopsis shows short information related to CLI command

type VsmUpdateCommand

type VsmUpdateCommand struct {
	// To control this CLI's display
	M Meta

	// OS command to execute; <optional>
	Cmd *exec.Cmd
	// contains filtered or unexported fields
}

func (*VsmUpdateCommand) Help

func (c *VsmUpdateCommand) Help() string

func (*VsmUpdateCommand) Run

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

func (*VsmUpdateCommand) Synopsis

func (c *VsmUpdateCommand) Synopsis() string

Jump to

Keyboard shortcuts

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