package
Version:
v1.9.0
Opens a new window with list of versions in this module.
Published: Oct 27, 2026
License: MIT
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package quotalimit lets a service consult Service Quotas applied values without importing it.
type Func func(account, region, serviceCode, quotaCode string) (limit float64, ok bool)
Func returns the applied limit of a quota for an account and Region; ok is false when none is known.
Gate holds the optional lookup; the zero value is ready to use and enforces nothing.
func (g *Gate) Lookup(account, region, serviceCode, quotaCode string) Limit
Lookup resolves the limit. Call it before taking a service lock: the lookup takes Service Quotas' own lock.
Set installs the lookup; nil disables enforcement.
Limit is a resolved quota limit; the zero value enforces nothing.
Reached reports whether creating one more resource beyond current would exceed the limit.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.