costmodel

package
v1.119.2 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2026 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute(conf *Config) error

func StartExportWorker added in v1.103.0

func StartExportWorker(ctx context.Context, model costmodel.AllocationModel) error

func StartMCPServer added in v1.119.0

func StartMCPServer(ctx context.Context, accesses *costmodel.Accesses, cloudCostQuerier cloudcost.Querier) error

StartMCPServer starts the MCP server as a background service

Types

type AllocationArgs added in v1.119.0

type AllocationArgs struct {
	Window    string `json:"window"`
	Aggregate string `json:"aggregate"`

	// Allocation query parameters
	Step                                  string `json:"step,omitempty"`
	Resolution                            string `json:"resolution,omitempty"`
	Accumulate                            bool   `json:"accumulate,omitempty"`
	ShareIdle                             bool   `json:"share_idle,omitempty"`
	IncludeIdle                           bool   `json:"include_idle,omitempty"`
	IdleByNode                            bool   `json:"idle_by_node,omitempty"`
	IncludeProportionalAssetResourceCosts bool   `json:"include_proportional_asset_resource_costs,omitempty"`
	IncludeAggregatedMetadata             bool   `json:"include_aggregated_metadata,omitempty"`
	ShareLB                               bool   `json:"share_lb,omitempty"`
	Filter                                string `json:"filter,omitempty"`
}

Tool argument structures for MCP server

type AssetArgs added in v1.119.0

type AssetArgs struct {
	Window string `json:"window"`
}

type CloudCostArgs added in v1.119.0

type CloudCostArgs struct {
	Window    string `json:"window"`
	Aggregate string `json:"aggregate"`

	// Cloud cost query parameters
	Accumulate string `json:"accumulate,omitempty"`
	Filter     string `json:"filter,omitempty"`
	Provider   string `json:"provider,omitempty"`
	Service    string `json:"service,omitempty"`
	Category   string `json:"category,omitempty"`
	Region     string `json:"region,omitempty"`
	Account    string `json:"account,omitempty"`
}

type Config added in v1.116.0

type Config struct {
	Port                   int
	KubernetesEnabled      bool
	CarbonEstimatesEnabled bool
	CloudCostEnabled       bool
	CustomCostEnabled      bool
	MCPServerEnabled       bool
}

Config contain configuration options that can be passed to the Execute() method

func DefaultConfig added in v1.116.0

func DefaultConfig() *Config

type EfficiencyArgs added in v1.119.0

type EfficiencyArgs struct {
	Window           string   `json:"window"`                      // Time window (e.g., "today", "yesterday", "7d", "lastweek")
	Aggregate        string   `json:"aggregate,omitempty"`         // Aggregation level (e.g., "pod", "namespace", "controller")
	Filter           string   `json:"filter,omitempty"`            // Filter expression (same as allocation filters)
	BufferMultiplier *float64 `json:"buffer_multiplier,omitempty"` // Buffer multiplier for recommendations (default: 1.2 for 20% headroom, e.g., 1.4 for 40%)
}

Jump to

Keyboard shortcuts

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