Rename some storage funcs
This commit is contained in:
parent
02ea8b1081
commit
c1e0d37266
|
@ -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()
|
||||
|
|
|
@ -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,
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue