commands

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2018 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreatePolicy

func CreatePolicy(cliConnection api.Connection, appName string, policyFile string) error

func DetachPolicy

func DetachPolicy(cliConnection api.Connection, appName string) error

func RetrieveHistory

func RetrieveHistory(cliConnection api.Connection, appName string, startTime, endTime int64, desc bool, writer io.Writer) error

func RetrieveMetrics

func RetrieveMetrics(cliConnection api.Connection, appName, metricName string, startTime, endTime int64, desc bool, writer io.Writer) error

func RetrievePolicy

func RetrievePolicy(cliConnection api.Connection, appName string, writer io.Writer) error

Types

type APIPositionalArgs

type APIPositionalArgs struct {
	URL string `positional-arg-name:"URL" description:"The autoscaler API endpoint"`
}

type ApiCommand

type ApiCommand struct {
	OptionalArgs      APIPositionalArgs `positional-args:"yes"`
	Unset             bool              `long:"unset" description:"Unset the api endpoint"`
	SkipSSLValidation bool              `long:"skip-ssl-validation" description:"Skip verification of the API endpoint. Not recommended!"`
}

func (ApiCommand) Execute

func (cmd ApiCommand) Execute([]string) error

func (*ApiCommand) GetEndpoint

func (cmd *ApiCommand) GetEndpoint() error

func (*ApiCommand) SetEndpoint

func (cmd *ApiCommand) SetEndpoint(cliConnection api.Connection, url string, skipSSLValidation bool) error

func (*ApiCommand) UnsetEndpoint

func (cmd *ApiCommand) UnsetEndpoint() error

type AttachPolicyCommand

type AttachPolicyCommand struct {
	RequiredlArgs AttachPolicyPositionalArgs `positional-args:"yes"`
}

func (AttachPolicyCommand) Execute

func (command AttachPolicyCommand) Execute([]string) error

type AttachPolicyPositionalArgs

type AttachPolicyPositionalArgs struct {
	AppName    string `positional-arg-name:"APP_NAME" required:"true" `
	PolicyFile string `positional-arg-name:"PATH_TO_POLICY_FILE" required:"true"`
}

type AutoScalerCmds

type AutoScalerCmds struct {
	CLIConnection api.Connection

	API          ApiCommand          `command:"autoscaling-api" description:"Set or view AutoScaler service API endpoint"`
	Policy       PolicyCommand       `command:"autoscaling-policy" description:"Retrieve the scaling policy of an application"`
	AttachPolicy AttachPolicyCommand `command:"attach-autoscaling-policy" description:"Attach a scaling policy to an application"`
	DetachPolicy DetachPolicyCommand `command:"detach-autoscaling-policy" description:"Detach a scaling policy from an application"`
	Metrics      MetricsCommand      `command:"autoscaling-metrics" description:"Retrieve the metrics of an application"`
	History      HistoryCommand      `command:"autoscaling-history" description:"Retrieve the history of an application"`

	UninstallPlugin UninstallHook `command:"CLI-MESSAGE-UNINSTALL"`
}
var AutoScaler AutoScalerCmds

type DetachPolicyCommand

type DetachPolicyCommand struct {
	RequiredlArgs DetachPolicyPositionalArgs `positional-args:"yes"`
}

func (DetachPolicyCommand) Execute

func (command DetachPolicyCommand) Execute([]string) error

type DetachPolicyPositionalArgs

type DetachPolicyPositionalArgs struct {
	AppName string `positional-arg-name:"APP_NAME" required:"true" `
}

type HistoryCommand

type HistoryCommand struct {
	RequiredlArgs HistoryPositionalArgs `positional-args:"yes"`
	StartTime     string                `` /* 175-byte string literal not displayed */
	EndTime       string                `` /* 173-byte string literal not displayed */
	Desc          bool                  `long:"desc" description:"display in descending order, default to ascending order if not specified."`
	Output        string                `long:"output" description:"dump the policy to a file in JSON format"`
}

func (HistoryCommand) Execute

func (command HistoryCommand) Execute([]string) error

type HistoryPositionalArgs

type HistoryPositionalArgs struct {
	AppName string `positional-arg-name:"APP_NAME" required:"true"`
}

type MetricsCommand

type MetricsCommand struct {
	RequiredlArgs MetricsPositionalArgs `positional-args:"yes"`
	StartTime     string                `` /* 175-byte string literal not displayed */
	EndTime       string                `` /* 173-byte string literal not displayed */
	Desc          bool                  `long:"desc" description:"display in descending order, default to ascending order if not specified."`
	Output        string                `long:"output" description:"dump the policy to a file in JSON format"`
}

func (MetricsCommand) Execute

func (command MetricsCommand) Execute([]string) error

type MetricsPositionalArgs

type MetricsPositionalArgs struct {
	AppName    string `positional-arg-name:"APP_NAME" required:"true"`
	MetricName string `` /* 143-byte string literal not displayed */
}

type PolicyCommand

type PolicyCommand struct {
	RequiredlArgs PolicyPositionalArgs `positional-args:"yes"`
	Output        string               `long:"output" description:"dump the policy to a file in JSON format"`
}

func (PolicyCommand) Execute

func (command PolicyCommand) Execute([]string) error

type PolicyPositionalArgs

type PolicyPositionalArgs struct {
	AppName string `positional-arg-name:"APP_NAME" required:"true"`
}

type UninstallHook

type UninstallHook struct{}

func (UninstallHook) Execute

func (command UninstallHook) Execute([]string) error

Jump to

Keyboard shortcuts

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