quota

package
v1.0.63 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2026 License: MIT Imports: 19 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
	KimiUsageURL           string
	XAIBillingURL          string
	AntigravityURLs        []string
	Now                    func() time.Time
	HTTPClient             func(*coreauth.Auth, time.Duration) (*http.Client, error)
	ResolveAuth            func(context.Context, *coreauth.Auth) (*coreauth.Auth, error)
}

Jump to

Keyboard shortcuts

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