Files
kopia/internal/cache/content_cache_passthrough.go
Jarek Kowalski cbc66f936d chore(ci): upgraded linter to 1.53.3 (#3079)
* chore(ci): upgraded linter to 1.53.3

This flagged a bunch of unused parameters, so the PR is larger than
usual, but 99% mechanical.

* separate lint CI task

* run Lint in separate CI
2023-06-18 13:26:01 -07:00

39 lines
871 B
Go

package cache
import (
"context"
"github.com/kopia/kopia/internal/gather"
"github.com/kopia/kopia/repo/blob"
)
// passthroughContentCache is a contentCache which does no caching.
type passthroughContentCache struct {
st blob.Storage
}
func (c passthroughContentCache) Close(ctx context.Context) {}
func (c passthroughContentCache) GetContent(ctx context.Context, contentID string, blobID blob.ID, offset, length int64, output *gather.WriteBuffer) error {
_ = contentID
//nolint:wrapcheck
return c.st.GetBlob(ctx, blobID, offset, length, output)
}
func (c passthroughContentCache) PrefetchBlob(ctx context.Context, blobID blob.ID) error {
_ = blobID
return nil
}
func (c passthroughContentCache) Sync(ctx context.Context, blobPrefix blob.ID) error {
_ = blobPrefix
return nil
}
func (c passthroughContentCache) CacheStorage() Storage {
return nil
}