Documentation
¶
Overview ¶
Package cache provides a generic interface for manipulating a BitTorrent tracker's fast moving data.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Pool ¶
Pool represents a thread-safe pool of connections to the data store that can be used to obtain transactions.
type Tx ¶
type Tx interface { // Reads FindUser(passkey string) (*models.User, bool, error) FindTorrent(infohash string) (*models.Torrent, bool, error) ClientWhitelisted(peerID string) (bool, error) // Writes RecordSnatch(u *models.User, t *models.Torrent) error MarkActive(t *models.Torrent) error AddLeecher(t *models.Torrent, p *models.Peer) error AddSeeder(t *models.Torrent, p *models.Peer) error RemoveLeecher(t *models.Torrent, p *models.Peer) error RemoveSeeder(t *models.Torrent, p *models.Peer) error SetLeecher(t *models.Torrent, p *models.Peer) error SetSeeder(t *models.Torrent, p *models.Peer) error IncrementSlots(u *models.User) error DecrementSlots(u *models.User) error LeecherFinished(t *models.Torrent, p *models.Peer) error // Priming / Testing AddTorrent(t *models.Torrent) error RemoveTorrent(t *models.Torrent) error AddUser(u *models.User) error RemoveUser(u *models.User) error WhitelistClient(peerID string) error UnWhitelistClient(peerID string) error }
The transmit object is the interface to add, remove and modify data in the cache
Click to show internal directories.
Click to hide internal directories.