Rename some storage funcs

This commit is contained in:
Matt Joiner 2016-05-16 22:02:03 +10:00
parent 02ea8b1081
commit c1e0d37266
3 changed files with 5 additions and 5 deletions

View File

@ -244,11 +244,11 @@ func TestClientTransferDefault(t *testing.T) {
}
func fileCachePieceResourceStorage(fc *filecache.Cache) storage.Client {
return storage.NewPiecePerResource(fc.AsResourceProvider())
return storage.NewResourcePieces(fc.AsResourceProvider())
}
func fileCachePieceFileStorage(fc *filecache.Cache) storage.Client {
return storage.NewPieceFileStorage(fc.AsFileStore())
return storage.NewFileStorePieces(fc.AsFileStore())
}
func TestClientTransferSmallCache(t *testing.T) {
@ -794,7 +794,7 @@ func testDownloadCancel(t *testing.T, ps testDownloadCancelParams) {
if ps.SetLeecherStorageCapacity {
fc.SetCapacity(ps.LeecherStorageCapacity)
}
cfg.DefaultStorage = storage.NewPieceFileStorage(fc.AsFileStore())
cfg.DefaultStorage = storage.NewFileStorePieces(fc.AsFileStore())
cfg.DataDir = leecherDataDir
leecher, _ := NewClient(&cfg)
defer leecher.Close()

View File

@ -15,7 +15,7 @@ type pieceFileStorage struct {
fs missinggo.FileStore
}
func NewPieceFileStorage(fs missinggo.FileStore) Client {
func NewFileStorePieces(fs missinggo.FileStore) Client {
return &pieceFileStorage{
fs: fs,
}

View File

@ -14,7 +14,7 @@ type piecePerResource struct {
p uniform.Provider
}
func NewPiecePerResource(p uniform.Provider) Client {
func NewResourcePieces(p uniform.Provider) Client {
return &piecePerResource{
p: p,
}