mirror of
https://github.com/restic/restic.git
synced 2026-07-13 10:45:09 +00:00
move Backend interface to backend package
This commit is contained in:
@@ -3,11 +3,12 @@ package restic
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/restic/restic/internal/backend"
|
||||
"github.com/restic/restic/internal/debug"
|
||||
"golang.org/x/sync/errgroup"
|
||||
)
|
||||
|
||||
func ParallelList(ctx context.Context, r Lister, t FileType, parallelism uint, fn func(context.Context, ID, int64) error) error {
|
||||
func ParallelList(ctx context.Context, r backend.Lister, t FileType, parallelism uint, fn func(context.Context, ID, int64) error) error {
|
||||
|
||||
type FileIDInfo struct {
|
||||
ID
|
||||
@@ -22,7 +23,7 @@ func ParallelList(ctx context.Context, r Lister, t FileType, parallelism uint, f
|
||||
// send list of index files through ch, which is closed afterwards
|
||||
wg.Go(func() error {
|
||||
defer close(ch)
|
||||
return r.List(ctx, t, func(fi FileInfo) error {
|
||||
return r.List(ctx, t, func(fi backend.FileInfo) error {
|
||||
id, err := ParseID(fi.Name)
|
||||
if err != nil {
|
||||
debug.Log("unable to parse %v as an ID", fi.Name)
|
||||
|
||||
Reference in New Issue
Block a user