Versions in this module Expand all Collapse all v0 v0.1.0 Nov 3, 2022 Changes in this version + type FileBackup struct + func (bck *FileBackup) Init(db storage.Database) error + func (bck *FileBackup) Load() error + func (bck *FileBackup) Save() error + type Memory struct + func (db *Memory) Backup() storage.Backup + func (db *Memory) Check() bool + func (db *Memory) Drop(hash storage.Hash, id storage.PeerID) + func (db *Memory) HashStats(hash storage.Hash) (complete, incomplete uint16) + func (db *Memory) Hashes() int + func (db *Memory) Init(backup storage.Backup) error + func (db *Memory) PeerList(hash storage.Hash, numWant uint, removePeerId bool) (peers [][]byte) + func (db *Memory) PeerListBytes(hash storage.Hash, numWant uint) (peers4 []byte, peers6 []byte) + func (db *Memory) SyncExpvars() error + func (db *Memory) Trim() + func (memoryDb *Memory) Save(ip netip.Addr, port uint16, complete bool, hash storage.Hash, ...) + type NoneBackup struct + func (bck *NoneBackup) Init(db storage.Database) error + func (bck NoneBackup) Load() error + func (bck NoneBackup) Save() error + type PeerMap struct + Complete uint16 + Incomplete uint16 + Peers map[storage.PeerID]*storage.Peer + type PgBackup struct + func (bck *PgBackup) Init(db storage.Database) error + func (bck PgBackup) Load() error + func (bck PgBackup) Save() error