Documentation ¶
Overview ¶
Package backend provides a generic interface for manipulating a BitTorrent tracker's consistent backend data store (usually for a web application).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Conn ¶
type Conn interface { // Close terminates connections to the database(s) and gracefully shuts // down the driver Close() error // Ping just checks to see if the database is still alive. This is typically // used for health checks. Ping() error // RecordAnnounce is called once per announce, and is passed the delta in // statistics for the client peer since its last announce. RecordAnnounce(delta *models.AnnounceDelta) error // LoadTorrents fetches and returns the specified torrents. LoadTorrents(ids []uint64) ([]*models.Torrent, error) // LoadAllTorrents fetches and returns all torrents. LoadAllTorrents() ([]*models.Torrent, error) // LoadUsers fetches and returns the specified users. LoadUsers(ids []uint64) ([]*models.User, error) // LoadAllUsers fetches and returns all users. LoadAllUsers(ids []uint64) ([]*models.User, error) }
Conn represents a connection to the data store.
Click to show internal directories.
Click to hide internal directories.