func ProvideStore(
	ctx context.Context,
	cache *cache.Cache,
	config *config.Config,
	db *pgxpool.Pool,
	logger *log.Logger,
) (*Store, func()) {
	ctx, cancel := context.WithCancel(ctx)
	s := &Store{
		cache:  cache,
		config: config,
		db:     db,
		logger: logger,
		sem:    semaphore.NewWeighted(int64(config.ChunkConcurrency)),
	}
	go s.backoffLoop(ctx)
	return s, cancel
}
ProvideStore is used by wire.
package blob
import (
	"bytes"
	"context"
	"crypto/sha256"
	"hash"
	"io"
	"math"
	"os"
	"time"
	"github.com/Mandala/go-log"
	"github.com/bobvawter/cacheroach/api/tenant"
	"github.com/bobvawter/cacheroach/pkg/cache"
	"github.com/bobvawter/cacheroach/pkg/store/config"
	"github.com/bobvawter/cacheroach/pkg/store/util"
	"github.com/google/uuid"
	"github.com/google/wire"
	"github.com/jackc/pgconn"
	"github.com/jackc/pgx/v4/pgxpool"
	"github.com/pkg/errors"
	"golang.org/x/sync/errgroup"
	"golang.org/x/sync/semaphore"
)
var Set = wire.NewSet(ProvideStore)
const (
	blobMetaKey  = "meta:"
	chunkDataKey = "chunk:"
)
type Store struct {
	cache  *cache.Cache
	config *config.Config
	db     *pgxpool.Pool
	logger *log.Logger
	sem    *semaphore.Weighted
}