replace-entry
A replace operation.
resource replace-entry;F get-age-ns
get-age-ns: func() -> result<option<duration-ns>, error>;Gets the age of the existing object during replace, returning
ok(none) if there was no object.
F get-body
get-body: func(options: get-body-options) -> result<option<body>, error>;Gets a range of the existing object body, returning ok(none) if there
was no existing object.
The returned body must be closed before calling this function
again on the same replace-entry.
F get-hits
get-hits: func() -> result<option<cache-hit-count>, error>;Gets the number of cache hits for the existing object during replace,
returning ok(none) if there was no object.
F get-length
get-length: func() -> result<option<object-length>, error>;Gets the content length of the existing object during replace,
returning ok(none) if there was no object, or no content
length was provided.
F get-max-age-ns
get-max-age-ns: func() -> result<option<duration-ns>, error>;Gets the configured max age of the existing object during replace,
returning ok(none) if there was no object.
F get-stale-while-revalidate-ns
get-stale-while-revalidate-ns: func() -> result<option<duration-ns>, error>;Gets the configured stale-while-revalidate period of the existing
object during replace, returning ok(none) if there was no
object.
F get-state
get-state: func() -> result<option<lookup-state>, error>;Gets the lookup state of the existing object during replace, returning
ok(none) if there was no object.
Note that FOUND == USABLE, and means "usable" (fresh or stale-while-revalidate). Some SDKs were released that checked only FOUND to infer "usable"; we preserve the equivalence for backwards compatibility.
F get-user-metadata
get-user-metadata: func(max-len: u64) -> result<option<list<u8>>, error>;Gets the user metadata of the existing object during replace, returning
ok(none) if there was no object.
F step
step: func() -> option<pollable>;Returns a pollable representing the next step of work for this replace-entry. The pollable can be used to wait until this replace-entry is unblocked.
The replace-entry may require steps to complete. When this returns none, the entry is ready.
F replace
replace: func(key: list<u8>, options: replace-options) -> result<replace-entry, error>;The entrypoint to the replace API.
This operation always participates in request collapsing and may return stale objects.