kubemodel

package
v1.121.0 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Janitor added in v1.121.0

type Janitor struct {
	// contains filtered or unexported fields
}

Janitor removes KubeModelSet files from storage that exceed the retention period for each resolution. Retention durations are read from the standard RESOLUTION_*_RETENTION env vars.

func NewJanitor added in v1.121.0

func NewJanitor(store storage.Storage, appName, clusterId string, resolutions []time.Duration) *Janitor

NewJanitor creates a Janitor for the given storage backend, cluster, and active resolutions.

func (*Janitor) Start added in v1.121.0

func (j *Janitor) Start(interval time.Duration)

Start launches the background retention cleanup loop. No-op if already running.

func (*Janitor) Stop added in v1.121.0

func (j *Janitor) Stop()

Stop halts the cleanup loop.

type Pipeline added in v1.121.0

type Pipeline struct {
	// contains filtered or unexported fields
}

Pipeline manages the KubeModel export controller group and the retention janitor.

func NewPipeline added in v1.121.0

func NewPipeline(appName, clusterUID string, store storage.Storage, cm ocexporter.ComputePipelineSource) (*Pipeline, error)

NewPipeline creates a new pipeline with preset settings

func (*Pipeline) Start added in v1.121.0

func (p *Pipeline) Start()

Start launches the export controllers and the retention janitor.

func (*Pipeline) Stop added in v1.121.0

func (p *Pipeline) Stop()

Stop halts the export controllers and the retention janitor.

type Querier added in v1.121.0

type Querier interface {
	Query(opencost.Window) ([]*coremodel.KubeModelSet, error)
}

Querier is the query interface used by KubeModelHandler, allowing the concrete *km.Querier to be swapped for a test double.

func NewQuerier added in v1.121.0

func NewQuerier(appName, clusterId string, store storage.Storage) Querier

NewQuerier creates a Querier backed by the given storage and cluster.

Jump to

Keyboard shortcuts

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