package
0.1.2
Repository: https://github.com/sot-tech/mochi.git
Documentation: pkg.go.dev

# Functions

InfoHashKey generates redis key for provided hash and flags.
NewStore creates new redis peer storage with provided configuration structure.
NoResultErr returns nil if provided err is redis.Nil otherwise returns err.
PackPeer generates concatenation of PeerID, net port and IP-address.
UnpackPeer constructs Peer from serialized by Peer.PackPeer data: PeerID[20by]Port[2by]net.IP[4/16by].

# Constants

CountDownloadsKey redis key for snatches (downloads) count.
CountLeecherKey redis key for leecher count.
CountSeederKey redis key for seeder count.
IH4LeecherKey redis hash key prefix for IPv4 leechers.
IH4SeederKey redis hash key prefix for IPv4 seeders.
IH6LeecherKey redis hash key prefix for IPv6 leechers.
IH6SeederKey redis hash key prefix for IPv6 seeders.
IHKey redis hash key for all info hashes.
PrefixKey prefix which will be prepended to ctx argument in storage.DataStorage calls.

# Structs

Config holds the configuration of a redis PeerStorage.
Connection is wrapper for redis.UniversalClient.