feat: support live logrefs for in-progress operations (#456)

This commit is contained in:
Gareth
2024-09-04 22:03:10 -07:00
committed by GitHub
parent b5e6febf45
commit bfaad8b69e
31 changed files with 960 additions and 277 deletions

View File

@@ -18,11 +18,11 @@ import (
"github.com/garethgeorge/backrest/gen/go/types"
v1 "github.com/garethgeorge/backrest/gen/go/v1"
"github.com/garethgeorge/backrest/internal/config"
"github.com/garethgeorge/backrest/internal/logwriter"
"github.com/garethgeorge/backrest/internal/oplog"
"github.com/garethgeorge/backrest/internal/oplog/bboltstore"
"github.com/garethgeorge/backrest/internal/orchestrator"
"github.com/garethgeorge/backrest/internal/resticinstaller"
"github.com/garethgeorge/backrest/internal/rotatinglog"
"golang.org/x/sync/errgroup"
"google.golang.org/protobuf/proto"
)
@@ -769,7 +769,7 @@ type systemUnderTest struct {
oplog *oplog.OpLog
opstore *bboltstore.BboltStore
orch *orchestrator.Orchestrator
logStore *rotatinglog.RotatingLog
logStore *logwriter.LogManager
config *v1.Config
}
@@ -791,7 +791,10 @@ func createSystemUnderTest(t *testing.T, config config.ConfigStore) systemUnderT
}
t.Cleanup(func() { opstore.Close() })
oplog := oplog.NewOpLog(opstore)
logStore := rotatinglog.NewRotatingLog(dir+"/log", 10)
logStore, err := logwriter.NewLogManager(dir+"/log", 10)
if err != nil {
t.Fatalf("Failed to create log store: %v", err)
}
orch, err := orchestrator.NewOrchestrator(
resticBin, cfg, oplog, logStore,
)