Documentation
¶
Overview ¶
Package accountsync writes the caller accounts the plans call for: it reads the pending account places off each published plan view and creates, closes or reopens their rows through the account store. The rows come back to the plans through the usual change feed. Every pod runs one; the writes are idempotent, so pods racing on one place converge on one row.
Out of scope: deciding what should exist (app/plan), deleting accounts (the foreign keys drop them with their team, project, user or service account), and provider accounts.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store interface {
EnsureManaged(ctx context.Context, want *account.Account) (string, error)
SetMembership(ctx context.Context, a *account.Account, closed, followsRoleBindings bool) error
}
Store is the account-store surface the writer needs; *account.Store satisfies it.
type Syncer ¶
type Syncer struct {
Store Store
// contains filtered or unexported fields
}
Syncer applies pending account places. OnPublish only hands the latest list over, so the engine's hooks never wait on Postgres.