Documentation
¶
Index ¶
- func Execute(conf *Config) error
- func StartExportWorker(ctx context.Context, model costmodel.AllocationModel) error
- func StartInferenceCostCollector(ctx context.Context, a *costmodel.Accesses, qs **inferencecost.QueryService) error
- func StartMCPServer(ctx context.Context, accesses *costmodel.Accesses, ...) error
- type AllocationArgs
- type AssetArgs
- type CloudCostArgs
- type Config
- type EfficiencyArgs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StartExportWorker ¶ added in v1.103.0
func StartExportWorker(ctx context.Context, model costmodel.AllocationModel) error
func StartInferenceCostCollector ¶ added in v1.121.0
func StartInferenceCostCollector(ctx context.Context, a *costmodel.Accesses, qs **inferencecost.QueryService) error
StartInferenceCostCollector initialises and starts the inference cost collection loop as a background goroutine, and populates *qs with the QueryService so the caller can register routes. It is a no-op if the collector cannot be initialised (error is logged, existing functionality is unaffected).
Types ¶
type AllocationArgs ¶ added in v1.118.1
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"`
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"`
Filter string `json:"filter,omitempty"`
}
Tool argument structures for MCP server
type CloudCostArgs ¶ added in v1.118.1
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
InferenceCostEnabled 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.118.1
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%)
Step string `json:"step,omitempty"` // Query step size (e.g., "1h", "6h"); smaller steps reduce peak memory by batching large windows, but may increase query time/requests
}
Click to show internal directories.
Click to hide internal directories.