Skip to content

BucketRegistry

Defined in: core/src/bucket/bucket.registry.ts:14

Registry of bucket definitions, keyed by id.

Registering is what makes a bucket known before anything touches it. BucketService learns of a bucket only when someone asks for an instance, so a bucket used solely inside an action stays invisible until that action first runs — too late for a host that mounts its HTTP routes at boot. A provider that registers its buckets during setup is discoverable from the start.

new BucketRegistry(): BucketRegistry;

BucketRegistry

get(id):
| BucketOptions
| undefined;

Defined in: core/src/bucket/bucket.registry.ts:40

Returns the bucket definition with the given id, or undefined if none matches.

Parameter Type
id string

| BucketOptions | undefined


list(): BucketOptions[];

Defined in: core/src/bucket/bucket.registry.ts:34

Lists all registered bucket definitions.

BucketOptions[]


listExposed(): BucketOptions[];

Defined in: core/src/bucket/bucket.registry.ts:37

Lists the registered buckets that opted into the host’s HTTP surface.

BucketOptions[]


register(...buckets): void;

Defined in: core/src/bucket/bucket.registry.ts:23

Registers one or more bucket definitions. Registering the same definition again is a no-op; a different definition claiming an id already taken throws BucketIdConflictError, matching BucketService — ids identify storage, so a collision is two owners writing to one place.

Parameter Type
buckets BucketOptions[]

void