barrel_att_backend behaviour (barrel_docdb v1.1.1)
View SourceAttachment storage backend behaviour.
An attachment backend stores document attachment bytes (and the small metadata needed to describe them) under a database/document/name key space. barrel_att_store_blob is the default backend (a RocksDB BlobDB instance). barrel_att_store is a thin dispatcher that selects a backend per database from att_opts.backend and routes calls to it, so additional backends (for example a local filesystem or an S3 object store) can be added without touching the document layer.
AttRef is the opaque handle returned by open/2; the dispatcher tags it with the backend module. Stream is the opaque streaming handle returned by put_stream/5 / get_stream/4 and embeds its att_ref.