Module persistent

Source
Expand description

This file contains the PersistentStore struct, which is a wrapper around a RecordStore that occasionally saves the DHT to a persistent storage.

Structs§

DhtFilePersistence
A PersistentStorage that persists the DHT to a file on disk. Used mostly for testing.
DhtNoPersistence
A no-op PersistentStorage that does not persist the DHT
PersistentStore
A RecordStore wrapper that occasionally saves the DHT to a persistent storage.
SerializableRecord
A serializable version of a Libp2p Record

Traits§

DhtPersistentStorage
A trait that we use to save and load the DHT to a file on disk or other storage medium

Functions§

instant_to_unix_seconds 🔒
Approximate an Instant to the number of seconds since the Unix epoch
unix_seconds_to_instant 🔒
Convert a unix-second timestamp to an Instant