Documentation
¶
Overview ¶
Package orgwatch remembers, per pod and in memory, the provider organization each credential's served responses name, and reports an account whose credentials name different ones: those keys are separate organizations with separate upstream limits, which the account counts as one.
It only reports, with one warning log line and one count of relay_account_org_mismatch_total per account and pair of organizations. It never moves a key or writes a row; detecting a key's account and moving it are the operator's actions on the control plane.
Out of scope: sharing what one pod saw with the others, and forgetting deleted credentials (their entries stay until restart, bounded by the credentials the pod served).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Watch ¶
type Watch struct {
// contains filtered or unexported fields
}
Watch is the per-pod memory of the organization each credential last named. Safe for concurrent use.
func (*Watch) ObserveOrg ¶
ObserveOrg records that credentialID, in accountID, was served under orgID. The repeat of what the credential last named takes a read lock and allocates nothing; anything new is compared against the account's other credentials.