quota

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2026 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collector

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

func NewCollector

func NewCollector(repo *cluster.Repository, options Options) *Collector

func (*Collector) Start

func (c *Collector) Start(ctx context.Context)

func (*Collector) TriggerCollection added in v1.0.61

func (c *Collector) TriggerCollection(ctx context.Context, credentialIDs map[string]struct{}, providers map[string]struct{}) (int, error)

TriggerCollection queues an asynchronous forced collection round for the matching credentials and returns how many new local jobs were accepted. Empty filters accept every eligible credential. The round runs on a detached context so it outlives the caller (for example an HTTP request).

func (*Collector) Wait added in v1.0.61

func (c *Collector) Wait()

Wait waits for asynchronous on-demand collection rounds to finish. It is primarily useful for deterministic tests.

type Options

type Options struct {
	Owner                    string
	HomeID                   string
	GlobalProxyURL           string
	GlobalProxyURLProvider   func() string
	PollInterval             time.Duration
	ProbeTimeout             time.Duration
	LeaseDuration            time.Duration
	SnapshotFreshness        time.Duration
	ProviderConcurrency      int
	CodexUsageURL            string
	CodexResetCreditsURL     string
	ClaudeUsageURL           string
	ClaudeProfileURL         string
	DevinQuotaURL            string
	KimiUsageURL             string
	XAIBillingURL            string
	XAIProfileURL            string
	MetaQuotaURL             string
	AntigravityURLs          []string
	AntigravityCodeAssistURL string
	Now                      func() time.Time
	HTTPClient               func(*coreauth.Auth, time.Duration) (*http.Client, error)
}

Jump to

Keyboard shortcuts

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