usagedb

package
v0.7.13 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeClient

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

func (*FakeClient) GetResourceUsage

func (f *FakeClient) GetResourceUsage() (*queue_info.ClusterUsage, error)

func (*FakeClient) SetResourceUsage

func (f *FakeClient) SetResourceUsage(resourceUsage *queue_info.ClusterUsage, err error)

type Interface

type Interface interface {
	GetResourceUsage() (*queue_info.ClusterUsage, error)
}

type UsageLister

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

func NewUsageLister

func NewUsageLister(client 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

Jump to

Keyboard shortcuts

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