usagedb

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientResolver added in v0.8.1

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

func NewClientResolver added in v0.8.1

func NewClientResolver(clientMapOverrides map[string]GetClientFn) *ClientResolver

func (*ClientResolver) GetClient added in v0.8.1

func (cr *ClientResolver) GetClient(config *api.UsageDBConfig) (api.Interface, error)

type GetClientFn added in v0.8.1

type GetClientFn func(connectionString string, usageParams *api.UsageParams) (api.Interface, error)

type UsageLister

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

func NewUsageLister

func NewUsageLister(client api.Interface, fetchInterval, stalenessPeriod, waitTimeout *time.Duration) *UsageLister

func (*UsageLister) GetResourceUsage

func (l *UsageLister) GetResourceUsage() (*queue_info.ClusterUsage, error)

GetResourceUsage returns the last known resource usage data. If the data is stale, an error is returned, but the most recent data is still returned.

func (*UsageLister) Start

func (l *UsageLister) Start(stopCh <-chan struct{})

Start begins periodic fetching of resource usage data in a background goroutine. The data is fetched every minute by default.

func (*UsageLister) WaitForCacheSync

func (l *UsageLister) WaitForCacheSync(stopCh <-chan struct{}) bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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