One bucket of a storage profile (V205), and how the profile uses it.
role—primary(written and served),replica(written; served when no primary has the object) orbackup(written; read only by repair and the reconciler, never served).stores—all,originals(original uploads only) orderived(sizes, tiles and renders only).write_priority— writes go to buckets with a fixed priority first (lowest first), then to the rest in random order (nil).serve_order— among the buckets that hold an object and may serve it, the lowest is served from.status—active,read_only(keeps serving, gets no new writes) ordraining(the reconciler copies its objects to the profile's other buckets, then unlinks them).storage_classandencryptionare reserved for later (G10);storage_classis allowed only on abackuprow, because archive tiers need a restore before a read.
A bucket's global enabled flag is still the emergency stop: a disabled
bucket is neither written nor read, whatever its profile rows say.
Summary
Functions
How a profile uses a bucket. The keys are set by the caller.
The roles, in the order buckets are written and served.
The statuses.
What a bucket may store.
Types
@type t() :: %PhoenixKit.Modules.Storage.ProfileBucket{ __meta__: term(), bucket: PhoenixKit.Modules.Storage.Bucket.t() | Ecto.Association.NotLoaded.t(), bucket_uuid: UUIDv7.t() | nil, encryption: map() | nil, inserted_at: DateTime.t() | nil, profile: term(), profile_uuid: UUIDv7.t() | nil, role: String.t(), serve_order: integer(), status: String.t(), storage_class: String.t() | nil, stores: String.t(), updated_at: DateTime.t() | nil, write_priority: integer() | nil }