recommend

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2026 License: Apache-2.0 Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package recommend provides cost optimization recommendations based on estimated resources.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatTable

func FormatTable(result *Result, noColor bool) string

FormatTable returns a human-readable table of recommendations.

Types

type Recommendation

type Recommendation struct {
	ResourceName   string           `json:"resourceName"`
	ResourceType   string           `json:"resourceType"`
	Category       string           `json:"category"`
	Title          string           `json:"title"`
	Description    string           `json:"description"`
	CurrentCost    *decimal.Decimal `json:"currentMonthlyCost"`
	SuggestedCost  *decimal.Decimal `json:"suggestedMonthlyCost,omitempty"`
	MonthlySavings *decimal.Decimal `json:"monthlySavings,omitempty"`
	SavingsPercent *decimal.Decimal `json:"savingsPercent,omitempty"`
}

Recommendation represents a single cost optimization suggestion.

type Result

type Result struct {
	Recommendations  []Recommendation `json:"recommendations"`
	TotalMonthlyCost *decimal.Decimal `json:"totalMonthlyCost"`
	PotentialSavings *decimal.Decimal `json:"potentialMonthlySavings"`
	SavingsPercent   *decimal.Decimal `json:"savingsPercent"`
}

Result holds all recommendations for a set of projects.

func Analyze

func Analyze(projects []*engine.Workspace) *Result

Analyze examines projects and returns cost optimization recommendations.

Jump to

Keyboard shortcuts

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