Module persist
Expand description
This module contains a simple key-value store trait KVStore
that
allows one to implement the persistence for ChannelManager
, NetworkGraph
,
and ChannelMonitor
all in one place.
Structs§
- Monitor
Name - A struct representing a name for a channel monitor.
- Monitor
Updating Persister - Implements
Persist
in a way that writes and reads bothChannelMonitor
s andChannelMonitorUpdate
s. - Update
Name - A struct representing a name for a channel monitor update.
Constants§
- ARCHIVED_
CHANNEL_ MONITOR_ PERSISTENCE_ PRIMARY_ NAMESPACE - The primary namespace under which archived
ChannelMonitor
s will be persisted. - ARCHIVED_
CHANNEL_ MONITOR_ PERSISTENCE_ SECONDARY_ NAMESPACE - The secondary namespace under which archived
ChannelMonitor
s will be persisted. - CHANNEL_
MANAGER_ PERSISTENCE_ KEY - The key under which the
ChannelManager
will be persisted. - CHANNEL_
MANAGER_ PERSISTENCE_ PRIMARY_ NAMESPACE - The primary namespace under which the
ChannelManager
will be persisted. - CHANNEL_
MANAGER_ PERSISTENCE_ SECONDARY_ NAMESPACE - The secondary namespace under which the
ChannelManager
will be persisted. - CHANNEL_
MONITOR_ PERSISTENCE_ PRIMARY_ NAMESPACE - The primary namespace under which
ChannelMonitor
s will be persisted. - CHANNEL_
MONITOR_ PERSISTENCE_ SECONDARY_ NAMESPACE - The secondary namespace under which
ChannelMonitor
s will be persisted. - CHANNEL_
MONITOR_ UPDATE_ PERSISTENCE_ PRIMARY_ NAMESPACE - The primary namespace under which
ChannelMonitorUpdate
s will be persisted. - KVSTORE_
NAMESPACE_ KEY_ ALPHABET - The alphabet of characters allowed for namespaces and keys.
- KVSTORE_
NAMESPACE_ KEY_ MAX_ LEN - The maximum number of characters namespaces and keys may have.
- MONITOR_
UPDATING_ PERSISTER_ PREPEND_ SENTINEL - A sentinel value to be prepended to monitors persisted by the
MonitorUpdatingPersister
. - NETWORK_
GRAPH_ PERSISTENCE_ KEY - The key under which the
NetworkGraph
will be persisted. - NETWORK_
GRAPH_ PERSISTENCE_ PRIMARY_ NAMESPACE - The primary namespace under which the
NetworkGraph
will be persisted. - NETWORK_
GRAPH_ PERSISTENCE_ SECONDARY_ NAMESPACE - The secondary namespace under which the
NetworkGraph
will be persisted. - OUTPUT_
SWEEPER_ PERSISTENCE_ KEY - The secondary namespace under which
OutputSweeper
state will be persisted. The key under whichOutputSweeper
state will be persisted. - OUTPUT_
SWEEPER_ PERSISTENCE_ PRIMARY_ NAMESPACE - The primary namespace under which
OutputSweeper
state will be persisted. - OUTPUT_
SWEEPER_ PERSISTENCE_ SECONDARY_ NAMESPACE - The secondary namespace under which
OutputSweeper
state will be persisted. - SCORER_
PERSISTENCE_ KEY - The key under which the
WriteableScore
will be persisted. - SCORER_
PERSISTENCE_ PRIMARY_ NAMESPACE - The primary namespace under which the
WriteableScore
will be persisted. - SCORER_
PERSISTENCE_ SECONDARY_ NAMESPACE - The secondary namespace under which the
WriteableScore
will be persisted.
Traits§
- KVStore
- Provides an interface that allows storage and retrieval of persisted values that are associated with given keys.
- MigratableKV
Store - Provides additional interface methods that are required for
KVStore
-to-KVStore
data migration. - Persister
- Trait that handles persisting a
ChannelManager
,NetworkGraph
, andWriteableScore
to disk.
Functions§
- migrate_
kv_ store_ data - Migrates all data from one store to another.
- read_
channel_ monitors - Read previously persisted
ChannelMonitor
s from the store.