mirror of
https://github.com/sot-tech/mochi.git
synced 2026-06-13 00:03:32 -07:00
Add Close to Conn interface
This commit is contained in:
@@ -68,6 +68,8 @@ type Pool interface {
|
||||
// Conn represents a connection to the data store that can be used
|
||||
// to make reads/writes.
|
||||
type Conn interface {
|
||||
Close() error
|
||||
|
||||
// Torrent interactions
|
||||
FindTorrent(infohash string) (*models.Torrent, error)
|
||||
PutTorrent(t *models.Torrent) error
|
||||
|
||||
@@ -17,6 +17,10 @@ type Conn struct {
|
||||
*Pool
|
||||
}
|
||||
|
||||
func (c *Conn) Close() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (c *Conn) FindUser(passkey string) (*models.User, error) {
|
||||
c.usersM.RLock()
|
||||
defer c.usersM.RUnlock()
|
||||
|
||||
Reference in New Issue
Block a user