storage: Rename mmapStorage->mmapClientImpl

This commit is contained in:
Matt Joiner 2018-01-06 16:38:41 +11:00
parent 56109b387d
commit 6bcf2a58b2
1 changed files with 4 additions and 4 deletions

View File

@ -14,7 +14,7 @@ import (
"github.com/anacrolix/torrent/mmap_span"
)
type mmapStorage struct {
type mmapClientImpl struct {
baseDir string
pc PieceCompletion
}
@ -24,13 +24,13 @@ func NewMMap(baseDir string) ClientImpl {
}
func NewMMapWithCompletion(baseDir string, completion PieceCompletion) ClientImpl {
return &mmapStorage{
return &mmapClientImpl{
baseDir: baseDir,
pc: completion,
}
}
func (s *mmapStorage) OpenTorrent(info *metainfo.Info, infoHash metainfo.Hash) (t TorrentImpl, err error) {
func (s *mmapClientImpl) OpenTorrent(info *metainfo.Info, infoHash metainfo.Hash) (t TorrentImpl, err error) {
span, err := mMapTorrent(info, s.baseDir)
t = &mmapTorrentStorage{
infoHash: infoHash,
@ -40,7 +40,7 @@ func (s *mmapStorage) OpenTorrent(info *metainfo.Info, infoHash metainfo.Hash) (
return
}
func (s *mmapStorage) Close() error {
func (s *mmapClientImpl) Close() error {
return s.pc.Close()
}