انتقل إلى المحتوى الرئيسي

Interface: S3ArtifactStore

Defined in: packages/artifact-store/src/s3/adapter.ts:77

The adapter, plus the shutdown the port leaves out because only the owner calls it.

Extends​

Properties​

bucket​

readonly bucket: string

Defined in: packages/artifact-store/src/s3/adapter.ts:79

The bucket this store writes to, for log lines and health rows.

Methods​

close()​

close(): void

Defined in: packages/artifact-store/src/s3/adapter.ts:81

Releases the client's sockets. Call once, after in-flight calls have settled.

Returns​

void


get()​

get(key): Promise<StoredArtifact | null>

Defined in: packages/artifact-store/src/port.ts:173

The object and its bytes, or null when the key holds nothing. For tests, the preview and the conditional-create check; never on a path that serves the public.

Parameters​

key​

string

Returns​

Promise<StoredArtifact | null>

Inherited from​

ArtifactStore.get


head(key): Promise<ArtifactHead | null>

Defined in: packages/artifact-store/src/port.ts:167

The object's metadata, or null when the key holds nothing.

Parameters​

key​

string

Returns​

Promise<ArtifactHead | null>

Inherited from​

ArtifactStore.head


put()​

Call Signature​

put(key, bytes, meta, options?): Promise<UnfencedPutResult>

Defined in: packages/artifact-store/src/port.ts:144

Stores bytes at key with meta, unchanged: no content encoding, no re-serialisation, no checksum trailer. Do not mutate bytes until it settles.

Two signatures, one behaviour. Without ifMatch the answer is stored or exists; with it, stale joins them. The first signature is the one that existed before the fence, so a caller that never fences is not asked to handle an answer it cannot get.

Parameters​
key​

string

bytes​

Uint8Array

meta​

ArtifactMeta

options?​

PutOptions & object

Returns​

Promise<UnfencedPutResult>

Throws​

On any failure. When indeterminate is true the write may have landed. For a create or a plain replace, retry with ifNoneMatch: '*' and treat exists with identical: true as success. For a fenced write, get the key: holding these bytes means it landed, and anything else is where the next fenced attempt starts from. Repeating the same ifMatch cannot tell the two apart, because a write that landed changed the tag.

Inherited from​

ArtifactStore.put

Call Signature​

put(key, bytes, meta, options): Promise<PutResult>

Defined in: packages/artifact-store/src/port.ts:159

The same put, fenced: with ifMatch the bytes are stored only if the key still holds the object that tag names, and the answer may be stale. Everything said above holds, the indeterminate rule for a fenced write included.

Parameters​
key​

string

bytes​

Uint8Array

meta​

ArtifactMeta

options​

PutOptions

Returns​

Promise<PutResult>

Throws​

On any failure, and invalid_request before any request for an ifMatch that is not one quoted entity tag or that comes with ifNoneMatch.

Inherited from​

ArtifactStore.put