commands

package
v3.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2019 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateCredential

func CreateCredential(cliConnection api.Connection, appName string, username string, password string, writer io.Writer, outputfile string) error

func CreatePolicy

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

func DeleteCredential

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

func DetachPolicy

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

func RetrieveAggregatedMetrics added in v1.1.0

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

func RetrieveHistory

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

func RetrievePolicy

func RetrievePolicy(cliConnection api.Connection, appName string, writer io.Writer, outputfile string) 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(cliConnection api.Connection) 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"`
	CreateCredential CreateCredentialCommand `command:"create-autoscaling-credential" description:"Create custom metric credential for an application"`
	DeleteCredential DeleteCredentialCommand `command:"delete-autoscaling-credential" description:"Delete the custom metric credential of 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 CreateCredentialCommand

type CreateCredentialCommand struct {
	RequiredArgs CreateCredentialPositionalArgs `positional-args:"yes"`
	Username     string                         `` /* 126-byte string literal not displayed */
	Password     string                         `` /* 126-byte string literal not displayed */
	Output       string                         `long:"output" description:"dump the credential to a file in JSON format"`
}

func (CreateCredentialCommand) Execute

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

type CreateCredentialPositionalArgs

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

type DeleteCredentialCommand

type DeleteCredentialCommand struct {
	RequiredlArgs DeleteCredentialPositionalArgs `positional-args:"yes"`
}

func (DeleteCredentialCommand) Execute

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

type DeleteCredentialPositionalArgs

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

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."`
	Asc           bool                  `long:"asc" description:"display in ascending order, default to descending 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."`
	Asc           bool                  `long:"asc" description:"display in ascending order, default to descending 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 `` /* 175-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