barrel_att_store (barrel_docdb v1.1.1)
View SourceAttachment store dispatcher.
Selects an attachment backend (a barrel_att_backend) per database and routes all attachment calls to it. The backend is chosen from att_opts.backend at open/2 (default barrel_att_store_blob, the RocksDB BlobDB backend) and tagged into the returned att_ref. Streaming handles embed their att_ref, so streaming calls dispatch to the same backend.
Callers (barrel_att, barrel_docdb, barrel_db_server) keep using this module; the backend split is transparent to them. This dispatcher is also the single keyspace choke point: every DbName resolves here, so backends always build blob and att-feed keys with the keyspace.
Summary
Functions
Attachment feed entries since an HLC (exclusive).
Hard-link snapshot of the attachment store into Path (timeline forks). {error, unsupported} for backends without it.
Delete with options (origin_hlc for replicated deletes).
Whether this database's backend supports attachment sync.
Types
Functions
-spec abort_stream(att_stream()) -> ok.
Attachment feed entries since an HLC (exclusive).
Hard-link snapshot of the attachment store into Path (timeline forks). {error, unsupported} for backends without it.
-spec close(att_ref()) -> ok.
-spec close_stream(att_stream()) -> ok.
Delete with options (origin_hlc for replicated deletes).
-spec finish_stream(att_stream()) -> {ok, map()} | {ok, ignored} | {error, term()}.
-spec read_chunk(att_stream()) -> {ok, binary(), att_stream()} | eof | {error, term()}.
Whether this database's backend supports attachment sync.
-spec write_chunk(att_stream(), binary()) -> {ok, att_stream()} | {error, term()}.