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
Click to show internal directories.
Click to hide internal directories.