mirror of
https://github.com/kopia/kopia.git
synced 2026-10-21 21:54:41 -04:00
refactor(repository): refactor internal/repolog package to support writing metrics in the future (#3610)
* renamed internal/repolog to internal/repodiag * refactored initialization * additional tests * linter fixes
This commit is contained in:
1 parent
37da48b641
commit
c478141bbf
14 files changed
+323
-93
No files matched your search
@@ -5,7 +5,7 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/kopia/kopia/internal/epoch"
|
||||
"github.com/kopia/kopia/internal/repolog"
|
||||
"github.com/kopia/kopia/internal/repodiag"
|
||||
"github.com/kopia/kopia/repo"
|
||||
"github.com/kopia/kopia/repo/blob"
|
||||
"github.com/kopia/kopia/repo/content/indexblob"
|
||||
@@ -66,7 +66,7 @@ func (c *commandBlobList) shouldInclude(b blob.Metadata) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
if strings.HasPrefix(string(b.BlobID), repolog.BlobPrefix) {
|
||||
if strings.HasPrefix(string(b.BlobID), repodiag.LogBlobPrefix) {
|
||||
return false
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
"github.com/pkg/errors"
|
||||
|
||||
"github.com/kopia/kopia/internal/clock"
|
||||
"github.com/kopia/kopia/internal/repolog"
|
||||
"github.com/kopia/kopia/internal/repodiag"
|
||||
"github.com/kopia/kopia/repo/blob"
|
||||
)
|
||||
|
||||
@@ -70,7 +70,7 @@ func getLogSessions(ctx context.Context, st blob.Reader) ([]*logSessionInfo, err
|
||||
|
||||
var allSessions []*logSessionInfo
|
||||
|
||||
if err := st.ListBlobs(ctx, repolog.BlobPrefix, func(bm blob.Metadata) error {
|
||||
if err := st.ListBlobs(ctx, repodiag.LogBlobPrefix, func(bm blob.Metadata) error {
|
||||
parts := strings.Split(string(bm.BlobID), "_")
|
||||
|
||||
//nolint:gomnd
|
||||
|
||||
Reference in new issue
Block a user