optimize

package
v0.69.0 Latest Latest
Warning

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

Go to latest
Published: May 4, 2024 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const BACKGROUND_COLOR = tcell.ColorBlack
View Source
const PAGE_EVENTS_TITLE = "Events"
View Source
const PAGE_EVENT_DETAILS_TITLE = "Event Details"
View Source
const TEXT_COLOR = tcell.ColorLightSkyBlue
View Source
const TEXT_COLOR_WARNING = tcell.ColorRed
View Source
const TIME_FORMAT = "2006-01-02 15:04:05"

Variables

This section is empty.

Functions

func NewCmdConfigure added in v0.36.0

func NewCmdConfigure() *cobra.Command

func NewCmdDelete added in v0.47.0

func NewCmdDelete() *cobra.Command

func NewCmdEvents added in v0.47.0

func NewCmdEvents() *cobra.Command

func NewCmdRecommendations added in v0.47.0

func NewCmdRecommendations() *cobra.Command

func NewCmdReport added in v0.69.0

func NewCmdReport() *cobra.Command

func NewCmdServoLogs added in v0.48.0

func NewCmdServoLogs() *cobra.Command

func NewCmdStart added in v0.37.0

func NewCmdStart() *cobra.Command

func NewCmdStatus added in v0.34.0

func NewCmdStatus() *cobra.Command

func NewCmdStop added in v0.37.0

func NewCmdStop() *cobra.Command

func NewCmdSuspend added in v0.37.0

func NewCmdSuspend() *cobra.Command

func NewCmdUnsuspend added in v0.37.0

func NewCmdUnsuspend() *cobra.Command

func NewSubCmd

func NewSubCmd() *cobra.Command

Types

type Blocker added in v0.51.0

type Blocker struct {
	Description string `json:"description"`
	Impact      string `json:"impact"`
	Overridable bool   `json:"-"` // do not write to json for orion
}

type Blockers added in v0.51.0

type Blockers struct {
	Stateful                    *Blocker `json:"stateful,omitempty"`
	NoTraffic                   *Blocker `json:"no_traffic,omitempty"`
	ResourcesNotSpecified       *Blocker `json:"resources_not_specified,omitempty"`
	CPUNotSpecified             *Blocker `json:"cpu_not_specified,omitempty"`
	MemNotSpecified             *Blocker `json:"mem_not_specified,omitempty"`
	CPUResourcesChange          *Blocker `json:"cpu_resources_change,omitempty"`
	MemoryResourcesChange       *Blocker `json:"mem_resources_change,omitempty"`
	K8sMetricsDeficient         *Blocker `json:"k8s_metrics_deficient,omitempty"`
	APMMetricsMissing           *Blocker `json:"apm_metrics_missing,omitempty"`
	APMMetricsDeficient         *Blocker `json:"apm_metrics_deficient,omitempty"`
	MultipleAPM                 *Blocker `json:"multiple_apm,omitempty"`
	UnequalLoadDistribution     *Blocker `json:"unequal_load_distribution,omitempty"`
	NoScaling                   *Blocker `json:"no_scaling,omitempty"`
	InsufficientRelativeScaling *Blocker `json:"insufficient_relative_scaling,omitempty"`
	InsufficientFixedScaling    *Blocker `json:"insufficient_fixed_scaling,omitempty"`
	MTBFHigh                    *Blocker `json:"mtbf_high,omitempty"`
	ErrorRateHigh               *Blocker `json:"error_rate_high,omitempty"`
	NoOrchestrationAgent        *Blocker `json:"no_orchestration_agent,omitempty"`
	BurstableInstance           *Blocker `json:"burstable_instance,omitempty"`
}

type CPU added in v0.36.0

type CPU struct {
	Max    float64 `json:"max"`
	Min    float64 `json:"min"`
	Pinned bool    `json:"pinned"`
}

type Config added in v0.36.0

type Config struct {
	Guardrails Guardrails `json:"guardrails"`
	Slo        Slo        `json:"slo"`
}

type ErrNoEvents added in v0.67.0

type ErrNoEvents struct{}

func (*ErrNoEvents) Error added in v0.67.0

func (e *ErrNoEvents) Error() string

type ErrorPercent added in v0.36.0

type ErrorPercent struct {
	Target     float64 `json:"target"`
	Discovered float64 `json:"discovered"`
}

type EventTableData added in v0.67.0

type EventTableData struct {
	tview.TableContent
	// contains filtered or unexported fields
}

func (*EventTableData) GetCell added in v0.67.0

func (d *EventTableData) GetCell(row, column int) *tview.TableCell

func (*EventTableData) GetColumnCount added in v0.67.0

func (d *EventTableData) GetColumnCount() int

func (*EventTableData) GetRowCount added in v0.67.0

func (d *EventTableData) GetRowCount() int

func (*EventTableData) InsertRow added in v0.67.0

func (d *EventTableData) InsertRow(row int)

type EventsRow added in v0.51.0

type EventsRow struct {
	Timestamp       time.Time
	EventAttributes map[string]any
	EntityInfo      string
	Summary         string
}

type Guardrails added in v0.36.0

type Guardrails struct {
	CPU CPU `json:"cpu"`
	Mem Mem `json:"mem"`
}

type IgnoredBlockers added in v0.51.0

type IgnoredBlockers struct {
	Principal Principal `json:"principal,omitempty"`
	Timestamp string    `json:"timestamp,omitempty"`
	Blockers  Blockers  `json:"blockers,omitempty"`
}

type JsonStoreItem added in v0.36.0

type JsonStoreItem struct {
	CreatedAt time.Time `json:"createdAt"`
	// Data           Data      `json:"data"`  NOTE: leave out data so that its type can be specified by embedding this type into another
	ID             string    `json:"id"`
	LayerID        string    `json:"layerId"`
	LayerType      string    `json:"layerType"`
	ObjectMimeType string    `json:"objectMimeType"`
	ObjectType     string    `json:"objectType"`
	ObjectVersion  int       `json:"objectVersion"`
	Patch          any       `json:"patch"`
	TargetObjectID any       `json:"targetObjectId"`
	UpdatedAt      time.Time `json:"updatedAt"`
}

TODO move to Orion package?

type K8SDeployment added in v0.36.0

type K8SDeployment struct {
	ClusterID     string `json:"clusterId"`
	DeploymentUID string `json:"deploymentUid"`
	ClusterName   string `json:"clusterName"`
	ContainerName string `json:"containerName"`
	NamespaceName string `json:"namespaceName"`
	WorkloadID    string `json:"workloadId"`
	WorkloadName  string `json:"workloadName"`
}

type MedianResponseTime added in v0.36.0

type MedianResponseTime struct {
	Target     float64 `json:"target"`
	Discovered float64 `json:"discovered"`
}

type Mem added in v0.36.0

type Mem struct {
	Max    float64 `json:"max"`
	Min    float64 `json:"min"`
	Pinned bool    `json:"pinned"`
}

type OptimizerConfiguration added in v0.36.0

type OptimizerConfiguration struct {
	Config           Config                `json:"config"`
	IgnoredBlockers  IgnoredBlockers       `json:"ignoredBlockers"`
	DesiredState     string                `json:"desiredState"`
	OptimizerID      string                `json:"optimizerId"`
	RestartTimestamp string                `json:"restartTimestamp"`
	Suspensions      map[string]Suspension `json:"suspensions"`
	Target           Target                `json:"target"`
}

type OptimizerStatus added in v0.48.0

type OptimizerStatus struct {
	AgentState        string                 `json:"agentState"`
	OptimizationState string                 `json:"optimizationState"`
	Optimizer         OptimizerConfiguration `json:"optimizer"`
	OptimizerID       string                 `json:"optimizerId"`
	OptimizerState    string                 `json:"optimizerState"`
	ServoUID          string                 `json:"servoUid"`
	Suspended         bool                   `json:"suspended"`
	TuningState       string                 `json:"tuningState"`
}

type Principal added in v0.51.0

type Principal struct {
	Id   string `json:"id"`
	Type string `json:"type"`
}

type Slo added in v0.36.0

type Slo struct {
	ErrorPercent       ErrorPercent       `json:"errorPercent"`
	MedianResponseTime MedianResponseTime `json:"medianResponseTime"`
}

type Suspension added in v0.36.0

type Suspension struct {
	Reason    string `json:"reason"`
	Timestamp string `json:"timestamp"`
	User      string `json:"user"`
}

type Target added in v0.36.0

type Target struct {
	K8SDeployment K8SDeployment `json:"k8sDeployment"`
}

Jump to

Keyboard shortcuts

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