jepsen.store.fressian
Supports serialization of various Jepsen datatypes via Fressian.
postprocess-fressian
(postprocess-fressian obj)
DEPRECATED: we now decode vectors directly in the Fressian reader.
Fressian likes to give us ArrayLists, which are kind of a PITA when you’re used to working with vectors.
We now write sequential types as their own vector wrappers, which means this is not necessary going forward, but I’m leaving this in place in case you have historical tests you need to re-process.
reader
(reader input-stream)
(reader input-stream opts)
Creates a Fressian reader given an InputStream. Options:
:handlers Read handlers
write-object+
(write-object+ writer-opts writer x)
(write-object+ writer-opts _ path x)
Takes options for writer
, a Fressian writer, and an object x
. Writes x
object to the given writer. If the write fails due to an unknown handler, backs up, traverses the structure of x
, and determines the path to the specific part which could not be serialized, throwing a more specific error. Uses writer-opts
to create new writers for this debugging process, if necessary.
writer
(writer output-stream)
(writer output-stream opts)
Creates a Fressian writer given an OutputStream. Options:
:handlers Write handlers