Documentation
¶
Index ¶
Constants ¶
const Event = "orb.usage"
Event is the extension bus channel on which a provider publishes a Reading it observed itself, such as limits reported alongside a turn; Client covers the providers read over HTTP.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Accounts ¶ added in v0.19.2
type Accounts interface {
List(context.Context) ([]accounts.Account, error)
Usage(ctx context.Context, provider, id string) (Snapshot, error)
Use(ctx context.Context, provider, id string) error
}
Accounts is the host's account book: its connected accounts, their plan limits, and the switch between them. A plugin offers another account when one runs out only where the host supplies it.
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache bounds quota history to 64 account keys and coalesces concurrent reads. Keys are caller-owned account identities or credential digests, never raw credentials.
type Client ¶
Client reads provider-reported quota only. URLs are injectable for tests and private deployments; credentials never follow redirects.