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§

MonitorName
A struct representing a name for a channel monitor.
MonitorUpdatingPersister
Implements Persist in a way that writes and reads both ChannelMonitors and ChannelMonitorUpdates.
UpdateName
A struct representing a name for a channel monitor update.

Constants§

ARCHIVED_CHANNEL_MONITOR_PERSISTENCE_PRIMARY_NAMESPACE
The primary namespace under which archived ChannelMonitors will be persisted.
ARCHIVED_CHANNEL_MONITOR_PERSISTENCE_SECONDARY_NAMESPACE
The secondary namespace under which archived ChannelMonitors 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 ChannelMonitors will be persisted.
CHANNEL_MONITOR_PERSISTENCE_SECONDARY_NAMESPACE
The secondary namespace under which ChannelMonitors will be persisted.
CHANNEL_MONITOR_UPDATE_PERSISTENCE_PRIMARY_NAMESPACE
The primary namespace under which ChannelMonitorUpdates 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 which OutputSweeper 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.
MigratableKVStore
Provides additional interface methods that are required for KVStore-to-KVStore data migration.
Persister
Trait that handles persisting a ChannelManager, NetworkGraph, and WriteableScore to disk.

Functions§

migrate_kv_store_data
Migrates all data from one store to another.
read_channel_monitors
Read previously persisted ChannelMonitors from the store.