Liking cljdoc? Tell your friends :D

konserve-gcs.core


*default-bucket*clj

source

*deletion-batch-size*clj

source

*output-stream-buffer-size*clj

source

blob-exists?clj

(blob-exists? client bucket store-path blob-key)
source

blob-idclj

(blob-id bucket blob-store-path)
(blob-id bucket store-path blob-key)
source

cloud-storage-clientclj

(cloud-storage-client {:keys [client project-id host]})

Create a GCS client. Supports :host for emulator endpoint (e.g., 'http://localhost:4443').

Create a GCS client. Supports :host for emulator endpoint (e.g., 'http://localhost:4443').
sourceraw docstring

connect-storeclj

(connect-store spec & {:keys [opts config] :as params})
source

copy-blobclj

(copy-blob client bucket store-path from-blob-key to-blob-key)

Copy blob from one key to another. Returns nil if source doesn't exist.

Copy blob from one key to another. Returns nil if source doesn't exist.
sourceraw docstring

create-bucketclj

(create-bucket client location bucket)
source

delete-blobclj

(delete-blob client bucket store-path blob-key)

Delete blob. Returns true if deleted, false if not found.

Delete blob. Returns true if deleted, false if not found.
sourceraw docstring

delete-many-blobsclj

(delete-many-blobs client bucket blob-store-paths)
source

delete-storeclj

(delete-store spec & {:keys [opts]})
source

get-bucketclj

(get-bucket client bucket-name)
source

list-objectsclj

(list-objects client bucket store-path)
source

read-blobclj

(read-blob client blob-id)
source

read-blob-with-generationclj

(read-blob-with-generation client blob-id)

Read blob and return {:data :generation}, ::not-found if the blob is genuinely absent (.get returns nil), or nil if it was deleted DURING the read (404 — stale generation, i.e. a concurrent-modification conflict). The two absent cases are distinguished so PReadMissSafe can turn a genuine miss into store-key-not-found while optimistic locking still sees the conflict.

Read blob and return {:data :generation}, ::not-found if the blob is genuinely
absent (`.get` returns nil), or nil if it was deleted DURING the read (404 —
stale generation, i.e. a concurrent-modification conflict). The two absent
cases are distinguished so PReadMissSafe can turn a genuine miss into
store-key-not-found while optimistic locking still sees the conflict.
sourceraw docstring

releaseclj

(release store env)
source

spec->store-pathclj

(spec->store-path {:keys [store-path store-id]})
source

store-exists?clj

(store-exists? spec & {:keys [opts]})

Check if a konserve store exists at the given spec.

Check if a konserve store exists at the given spec.
sourceraw docstring

write-blobclj

(write-blob client blob-id bytes)
source

write-blob-conditionalclj

(write-blob-conditional client blob-id bytes expected-generation)

Write bytes only if the object's generation is still expected-generation, or — when that is :absent — only if there is no object. True on success, false when GCS refuses.

GCS evaluates the precondition itself, which is what makes this backing's guarantee :global: the comparison and the write are one step against every writer anywhere, not merely those sharing a filesystem or a heap.

Create-if-absent is ifGenerationMatch(0). Zero is GCS's way of saying THE OBJECT MUST NOT EXIST, and using it keeps both halves of the contract on one mechanism rather than adding a separate existence probe that another writer could slip past.

412 is the refusal in both cases.

Write `bytes` only if the object's generation is still `expected-generation`, or
— when that is `:absent` — only if there is no object. True on success, false
when GCS refuses.

GCS evaluates the precondition itself, which is what makes this backing's
guarantee `:global`: the comparison and the write are one step against every
writer anywhere, not merely those sharing a filesystem or a heap.

Create-if-absent is `ifGenerationMatch(0)`. Zero is GCS's way of saying THE
OBJECT MUST NOT EXIST, and using it keeps both halves of the contract on one
mechanism rather than adding a separate existence probe that another writer
could slip past.

412 is the refusal in both cases.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close