Files
kopia/cli/command_cache_sync.go
Jarek Kowalski 30ca3e2e6c Upgraded linter to 1.40.1 (#1072)
* tools: upgraded linter to 1.40.1

* lint: fixed nolintlint vionlations

* lint: disabled tagliatele linter

* lint: fixed remaining warnings
2021-05-15 12:12:34 -07:00

20 lines
485 B
Go

package cli
import (
"context"
"github.com/kopia/kopia/repo"
)
type commandCacheSync struct{}
func (c *commandCacheSync) setup(svc appServices, parent commandParent) {
cmd := parent.Command("sync", "Synchronizes the metadata cache with blobs in storage")
cmd.Action(svc.directRepositoryWriteAction(c.run))
}
func (c *commandCacheSync) run(ctx context.Context, rep repo.DirectRepositoryWriter) error {
// nolint:wrapcheck
return rep.ContentManager().SyncMetadataCache(ctx)
}