Ankusa.BlobStore.LocalFS (ankusa v0.7.0)

Copy Markdown View Source

Default Ankusa.BlobStore: immutable objects on the local filesystem.

Objects live under opts[:root] (an absolute path), by default Config.path(config, "segments"). A dedicated claim store (claim_check.blob_stores: [{LocalFS, root: "/shared/claims"}]) points it elsewhere — at a directory every node and the gateway mount, say.

Writes are atomic (temp file + rename) and durable (file and directory fsyncs), so a reader never sees a half-written object and a committed one survives power loss. Reads use :file.pread/3 for a single-record range GET without slurping the whole object into memory.

Summary

Functions

The directory objects live under: opts[:root], else the instance's segments dir.

Functions

root(instance, opts)

@spec root(atom(), keyword()) :: String.t()

The directory objects live under: opts[:root], else the instance's segments dir.