command

package
v0.0.27 Latest Latest
Warning

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

Go to latest
Published: May 17, 2022 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCreateApplicationCommand

func NewCreateApplicationCommand(cfg Config, p Printer) *cobra.Command

NewCreateApplicationCommand returns a command for creating applications.

func NewCreateRecommendationsConfigCommand

func NewCreateRecommendationsConfigCommand(cfg Config, p Printer) *cobra.Command

NewCreateRecommendationsConfigCommand returns a new command for creating recommendation configurations.

func NewCreateScenarioCommand

func NewCreateScenarioCommand(cfg Config, p Printer) *cobra.Command

NewCreateScenarioCommand returns a command for creating scenarios.

func NewCreateTrialCommand

func NewCreateTrialCommand(cfg Config, p Printer) *cobra.Command

NewCreateTrialCommand returns a command for creating a trial.

func NewDeleteApplicationsCommand

func NewDeleteApplicationsCommand(cfg Config, p Printer) *cobra.Command

NewDeleteApplicationsCommand returns a command for deleting applications.

func NewDeleteClustersCommand

func NewDeleteClustersCommand(cfg Config, p Printer) *cobra.Command

NewDeleteClustersCommand returns a command for deleting clusters.

func NewDeleteExperimentsCommand

func NewDeleteExperimentsCommand(cfg Config, p Printer) *cobra.Command

NewDeleteExperimentsCommand returns a command for deleting experiments.

func NewDeleteScenariosCommand

func NewDeleteScenariosCommand(cfg Config, p Printer) *cobra.Command

NewDeleteScenariosCommand returns a command for deleting scenarios.

func NewDeleteTrialsCommand

func NewDeleteTrialsCommand(cfg Config, p Printer) *cobra.Command

NewDeleteTrialsCommand returns a command for deleting ("abandoning") trials.

func NewEditApplicationCommand

func NewEditApplicationCommand(cfg Config, p Printer) *cobra.Command

NewEditApplicationCommand returns a command for editing an application.

func NewEditClusterCommand

func NewEditClusterCommand(cfg Config, p Printer) *cobra.Command

NewEditClusterCommand returns a command for editing a cluster.

func NewEditExperimentCommand

func NewEditExperimentCommand(cfg Config, p Printer) *cobra.Command

NewEditExperimentCommand returns a command for editing an experiment.

func NewEditScenarioCommand

func NewEditScenarioCommand(cfg Config, p Printer) *cobra.Command

NewEditScenarioCommand returns a command for editing a scenario.

func NewEditTrialCommand

func NewEditTrialCommand(cfg Config, p Printer) *cobra.Command

NewEditTrialCommand returns a command for editing a trial.

func NewGetActivityCommand added in v0.0.27

func NewGetActivityCommand(cfg Config, p Printer) *cobra.Command

NewGetActivityCommand returns a command for getting activity feed items.

func NewGetApplicationsCommand

func NewGetApplicationsCommand(cfg Config, p Printer) *cobra.Command

NewGetApplicationsCommand returns a command for getting applications.

func NewGetClustersCommand

func NewGetClustersCommand(cfg Config, p Printer) *cobra.Command

NewGetClustersCommand returns a command for getting clusters.

func NewGetExperimentsCommand

func NewGetExperimentsCommand(cfg Config, p Printer) *cobra.Command

NewGetExperimentsCommand returns a command for getting experiments.

func NewGetRecommendationsCommand

func NewGetRecommendationsCommand(cfg Config, p Printer) *cobra.Command

NewGetRecommendationsCommand returns a command for getting recommendations.

func NewGetScenariosCommand

func NewGetScenariosCommand(cfg Config, p Printer) *cobra.Command

NewGetScenariosCommand returns a command for getting scenarios.

func NewGetTrialsCommand

func NewGetTrialsCommand(cfg Config, p Printer) *cobra.Command

NewGetTrialsCommand returns a command for getting trials.

func NewWatchActivityCommand

func NewWatchActivityCommand(cfg Config) *cobra.Command

NewWatchActivityCommand returns a command for watching the activity feed.

Types

type ActivityOutput added in v0.0.27

type ActivityOutput struct {
	Items []ActivityRow `json:"-"`

	applications.ActivityFeed
}

func (*ActivityOutput) Add added in v0.0.27

type ActivityRow added in v0.0.27

type ActivityRow struct {
	ID               string `table:"id" csv:"id" json:"-"`
	Title            string `table:"title" csv:"title" json:"-"`
	Tags             string `table:"tags" csv:"tags" json:"-"`
	ExternalURL      string `table:"reference" csv:"external_url" json:"-"`
	URL              string `table:"url,wide" csv:"url" json:"-"`
	FailureReason    string `table:"reason,wide" csv:"failure_reason" json:"-"`
	PublishedHuman   string `table:"published" csv:"-" json:"-"`
	PublishedMachine string `table:"-" csv:"published" json:"-"`

	applications.ActivityItem `table:"-" csv:"-"`
}

type ApplicationOutput

type ApplicationOutput struct {
	Items []ApplicationRow `json:"items"`
}

ApplicationOutput wraps an application list for output.

func (*ApplicationOutput) Add

Add an application item to the output.

type ApplicationRow

type ApplicationRow struct {
	Name                string `table:"name" csv:"name" json:"-"`
	Title               string `table:"title" csv:"title" json:"-"`
	ScenarioCount       int    `table:"scenarios,wide" csv:"scenario_count" json:"-"`
	RecommendationMode  string `table:"recommendations" csv:"recommendations" json:"-"`
	DeployInterval      string `table:"deploy_interval" csv:"deploy_interval" json:"-"`
	LastDeployedMachine string `table:"-" csv:"last_deployed" json:"-"`
	LastDeployedHuman   string `table:"last_deployed" csv:"-" json:"-"`
	Age                 string `table:"age,wide" csv:"-" json:"-"`

	applications.ApplicationItem `table:"-" csv:"-"`
}

ApplicationRow is a table row representation of an application.

type ClusterOutput

type ClusterOutput struct {
	Items []ClusterRow `json:"items"`
}

ClusterOutput wraps a cluster list for output.

func (*ClusterOutput) Add

Add a cluster item to the output.

type ClusterRow

type ClusterRow struct {
	Name                   string `table:"name" csv:"name" json:"-"`
	DisplayName            string `table:"title" json:"-"`
	OptimizeProVersion     string `table:"optimize_pro" csv:"optimize_pro_version" json:"-"`
	OptimizeLiveVersion    string `table:"optimize_live" csv:"optimize_live_version" json:"-"`
	PerformanceTestVersion string `table:"performance_test,wide" csv:"performance_test_version" json:"-"`
	KubernetesVersion      string `table:"kubernetes,wide" csv:"kubernetes_version" json:"-"`
	LastSeenMachine        string `table:"-" csv:"last_seen" json:"-"`
	LastSeenHuman          string `table:"last_seen" csv:"-" json:"-"`
	Age                    string `table:"age,wide" csv:"-" json:"-"`

	applications.ClusterItem `table:"-" csv:"-"`
}

ClusterRow is a table row representation of a cluster.

type Config

type Config interface {
	// Address returns the base address for the API endpoints.
	Address() string
}

Config represents the configuration necessary to run a command.

type ExperimentOutput

type ExperimentOutput struct {
	Items []ExperimentRow `json:"items"`
}

ExperimentOutput wraps an experiment list for output.

func (*ExperimentOutput) Add

Add an experiment item to the output.

type ExperimentRow

type ExperimentRow struct {
	Name         string            `table:"name" csv:"name" json:"-"`
	DisplayName  string            `table:"Name,custom" json:"-"`
	Observations int64             `table:"observations,wide" csv:"observations" json:"-"`
	Labels       map[string]string `table:"labels,labels" csv:"label_,labels,flatten" json:"-"`

	experiments.ExperimentItem `table:"-" csv:"-"`
}

ExperimentRow is a table row representation of an experiment.

type Printer

type Printer interface {
	// Fprint renders an object (which may represent a list) to the supplied writer.
	Fprint(out io.Writer, obj interface{}) error
}

Printer is the interface required to render results.

type RecommendationOutput

type RecommendationOutput struct {
	Items []RecommendationRow `json:"items"`
}

RecommendationOutput wraps a recommendation list for output.

func (*RecommendationOutput) Add

Add a recommendation item to the output.

type RecommendationRow

type RecommendationRow struct {
	applications.RecommendationItem `table:"-" csv:"-"`
}

RecommendationRow is a table row representation of a recommendation.

type ScenarioOutput

type ScenarioOutput struct {
	Items []ScenarioRow `json:"items"`
}

ScenarioOutput wraps a scenario list for output.

func (*ScenarioOutput) Add

Add a scenario item to the output.

type ScenarioRow

type ScenarioRow struct {
	Name string `table:"name" csv:"name" json:"-"`

	applications.ScenarioItem `table:"-" csv:"-"`
}

ScenarioRow is a table row representation of a scenario.

type TrialOutput

type TrialOutput struct {
	Items []TrialRow `json:"items"`
}

TrialOutput wraps a trial list for output.

func (*TrialOutput) Add

func (o *TrialOutput) Add(item *experiments.TrialItem) error

Add a trial item to the output.

type TrialRow

type TrialRow struct {
	Experiment     string            `table:"experiment,custom" csv:"experiment" json:"-"`
	Name           string            `table:"name" json:"-"`
	Number         int64             `table:"number,custom" csv:"number" json:"-"`
	Status         string            `table:"status" csv:"status" json:"-"`
	Assignments    map[string]string `csv:"parameter_,flatten" json:"-"`
	Values         map[string]string `csv:"metric_,flatten" json:"-"`
	FailureReason  string            `table:"failure_reason,wide" csv:"failure_reason" json:"-"`
	FailureMessage string            `table:"failure_message,wide" csv:"failure_message" json:"-"`
	Labels         map[string]string `table:"labels,labels" csv:"label_,labels,flatten" json:"-"`

	experiments.TrialItem `table:"-" csv:"-"`
}

TrialRow is a table row representation of a trial.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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