Files
kopia/internal/cache/content_cache_passthrough.go
Julio Lopez 8098f49c90 chore(ci): remove exclusion for unused ctx parameters (#4530)
Remove unused-parameter exclusion for `ctx` in revive linter.

---------

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
Co-authored-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2025-04-26 23:11:36 -07:00

39 lines
865 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(_ 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(_ context.Context, blobID blob.ID) error {
_ = blobID
return nil
}
func (c passthroughContentCache) Sync(_ context.Context, blobPrefix blob.ID) error {
_ = blobPrefix
return nil
}
func (c passthroughContentCache) CacheStorage() Storage {
return nil
}