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
Updating Persister - Implements
Persist
in a way that writes and reads bothChannelMonitor
s andChannelMonitorUpdate
s.
Constants§
- 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. - 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.
- Persister
- Trait that handles persisting a
ChannelManager
,NetworkGraph
, andWriteableScore
to disk.
Functions§
- read_
channel_ monitors - Read previously persisted
ChannelMonitor
s from the store.