# Packages
Package keydb implements the storage interface.
No description provided by the author
Package memory implements the storage interface for a Conf BitTorrent tracker keeping peer data in memory.
Package pg implements PostgreSQL-like storage interface.
Package redis implements the storage interface.
Package test contains generated data for storage tests.
# Functions
NewDataStorage attempts to initialize a new DataStorage instance from the list of registered drivers.
NewPeerStorage attempts to initialize a new PeerStorage instance from the list of registered drivers.
RegisterDriver makes a Driver available by the provided name.
# Constants
DefaultGarbageCollectionInterval default interval of stale peers deletions.
DefaultPeerLifetime default peer lifetime.
DefaultPrometheusReportingInterval default interval of statistics collection.
# Variables
ErrResourceDoesNotExist is the error returned by all delete methods and the AnnouncePeers method of the PeerStorage interface if the requested resource does not exist.
PromGCDurationMilliseconds is a histogram used by storage to record the durations of execution time required for removing expired peers.
PromInfoHashesCount is a gauge used to hold the current total amount of unique swarms being tracked by a storage.
PromLeechersCount is a gauge used to hold the current total amount of unique leechers per swarm.
PromSeedersCount is a gauge used to hold the current total amount of unique seeders per swarm.
# Interfaces
DataStorage is the interface, used for implementing store for arbitrary data.
Driver is the interface used to initialize a new DataStorage or PeerStorage with provided configuration.
GarbageCollector marks that this storage supports periodic stale peers collection.
PeerStorage is an interface that abstracts the interactions of storing and manipulating Peers such that it can be implemented for various data stores.
StatisticsCollector marks that this storage supports periodic statistics collection.