Interface: PutOptions
Defined in: packages/artifact-store/src/port.ts:51
How a put behaves when the key already holds an object. The two conditions are
alternatives: a put that names both is refused as invalid_request before any
request, since "only if empty" and "only if it is this object" cannot both hold.
Properties
ifMatch?
readonlyoptionalifMatch?:string
Defined in: packages/artifact-store/src/port.ts:68
An entity tag, exactly as head, get or an earlier put returned it (quotes
included). The write happens only if the key still holds the object with that tag:
the store compares and replaces in one step, and put resolves stale when the
object has changed or is gone. This is the fence for read, change, write back.
Only a strong tag in its quoted form is accepted; *, an empty string and a weak
tag (W/"...") are invalid_request. An empty etag from a store that sends none
therefore cannot be used as a fence, which is the safe reading of "no tag".
ifNoneMatch?
readonlyoptionalifNoneMatch?:"*"
Defined in: packages/artifact-store/src/port.ts:57
'*' writes only if the key is empty: the store refuses atomically otherwise, and
put resolves exists instead of overwriting. Absent, the write replaces whatever
the key holds.