(block conn network dbid block)
Reads a single block from storage
Reads a single block from storage
(block-range conn network dbid start)
(block-range conn network dbid start end)
Returns a channel that will contains blocks in specified range.
Returns a channel that will contains blocks in specified range.
(block-storage-path conn network dbid)
For a ledger server, will return the storage path it is using for blocks for a given ledger.
For a ledger server, will return the storage path it is using for blocks for a given ledger.
(child-data child)
Given a child, unresolved node, extracts just the data that will go into storage.
Given a child, unresolved node, extracts just the data that will go into storage.
(ledger-block-file-path network ledger-id block)
(ledger-block-key network ledger-id block)
(ledger-garbage-key network ledger-key block)
(ledger-node-key network ledger-id idx-type base-id node-type)
(ledger-root-key network ledger-id block)
(read-block conn network ledger-id block)
Returns a core async channel with the requested block.
Returns a core async channel with the requested block.
(read-block-version conn network ledger-id block version)
Returns a core async channel with the requested block.
Returns a core async channel with the requested block.
(read-branch conn key)
Reads and deserializes branch node.
Reads and deserializes branch node.
(read-db-root conn network dbid block)
Returns all data for a db index root of a given block.
Returns all data for a db index root of a given block.
(read-garbage conn network dbid block)
Returns a all data for a db index root of a given block.
Returns a all data for a db index root of a given block.
(read-leaf conn key)
Reads and deserializes a leaf node
Reads and deserializes a leaf node
(reify-branch conn
config
network
dbid
key
block
t
tt-id
leftmost?
tempid
error-fn)
Should throw if no result... should never be the case.
Should throw if no result... should never be the case.
(reify-db conn network dbid blank-db index)
Reifies db at specified index point. If unable to read db-root at index, throws.
Reifies db at specified index point. If unable to read db-root at index, throws.
(reify-db-root conn blank-db root-data)
Constructs db from blank-db, and ensure index roots have proper config as unresolved nodes.
Constructs db from blank-db, and ensure index roots have proper config as unresolved nodes.
(reify-history conn key error-fn)
(reify-index-root conn index-configs network dbid index index-data block t)
Turns each index root node into an unresolved node.
Turns each index root node into an unresolved node.
(reify-leaf conn config key block t rhs error-fn)
Should throw if no result... should never be the case.
Should throw if no result... should never be the case.
(resolve-history-range node from-t to-t idx-novelty leftmost?)
Gets a history slice of a node with the oldest 't' from-t, to the most recent 't', to-t.
Returns sorted set in novelty's sort order (spot, psot, post, or opst)
Gets a history slice of a node with the oldest 't' from-t, to the most recent 't', to-t. Returns sorted set in novelty's sort order (spot, psot, post, or opst)
(resolve-t node t idx-novelty rhs leftmost? remove-preds error-fn)
(resolve-to-t node
id
tempid
rhs
leftmost?
t
tt-id
idx-novelty
conn
fast-foward-db?
remove-preds)
(serde conn)
Returns serializer from connection.
Returns serializer from connection.
(source-novelty-t novelty first-flake rhs leftmost?)
(source-novelty-t novelty first-flake rhs leftmost? through-t)
Given a novelty set, a first-flake and rhs flake boundary, returns novelty subrange as a collection.
If through-t is specified, will return novelty only through the specified t.
Given a novelty set, a first-flake and rhs flake boundary, returns novelty subrange as a collection. If through-t is specified, will return novelty only through the specified t.
(storage-exists? conn key)
Returns truthy if the provided key exists in storage.
Returns truthy if the provided key exists in storage.
(storage-read conn key)
Reads raw bytes from storage based on provided key. Returns core async channel with eventual response
Reads raw bytes from storage based on provided key. Returns core async channel with eventual response
(storage-write conn key val)
Writes raw bytes to storage based with provided key.
Writes raw bytes to storage based with provided key.
(write-block conn network dbid block-data)
Block data should look like:
{:block block (long) :flakes flakes :hash hash :sigs sigs :txns {tid (tx-id, string) {:cmd command (JSON string) :sig signature (string}]}
Block data should look like: {:block block (long) :flakes flakes :hash hash :sigs sigs :txns {tid (tx-id, string) {:cmd command (JSON string) :sig signature (string}]}
(write-block-version conn network dbid block-data version)
Block data should look like:
{:block block (long) :flakes flakes :hash hash :sigs sigs :txns {tid (tx-id, string) {:cmd command (JSON string) :sig signature (string}]}
Block data should look like: {:block block (long) :flakes flakes :hash hash :sigs sigs :txns {tid (tx-id, string) {:cmd command (JSON string) :sig signature (string}]}
(write-branch conn network dbid idx-type id children)
Returns core async channel with index key
Returns core async channel with index key
(write-branch-data conn key data)
Serializes final data for branch and writes it to provided key
Serializes final data for branch and writes it to provided key
(write-db-root db)
(write-db-root db custom-ecount)
(write-garbage db {:keys [garbage] :as progress})
Writes garbage record out for latest index.
Writes garbage record out for latest index.
(write-history conn history his-key next-his-key)
(write-leaf conn network dbid idx-type id flakes history)
Writes a leaf plus its history.
Writes history first, and only on successful history write then writes leaf.
Returns leaf's key
Writes a leaf plus its history. Writes history first, and only on successful history write then writes leaf. Returns leaf's key
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close