mirror of
https://github.com/project-zot/zot.git
synced 2024-12-16 21:56:37 -05:00
fa4b69954d
* build(deps): bump all dependencies Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de> * build(deps): bump all dependencies Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de> Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de> * build(deps): bump all dependencies Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de> Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de> * build(deps): bump all dependencies Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de> --------- Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de> Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de>
34 lines
1.1 KiB
Go
34 lines
1.1 KiB
Go
package s3
|
|
|
|
import (
|
|
// Add s3 support.
|
|
"github.com/distribution/distribution/v3/registry/storage/driver"
|
|
// Load s3 driver.
|
|
_ "github.com/distribution/distribution/v3/registry/storage/driver/s3-aws"
|
|
|
|
"zotregistry.dev/zot/pkg/extensions/monitoring"
|
|
zlog "zotregistry.dev/zot/pkg/log"
|
|
"zotregistry.dev/zot/pkg/storage/cache"
|
|
common "zotregistry.dev/zot/pkg/storage/common"
|
|
"zotregistry.dev/zot/pkg/storage/imagestore"
|
|
storageTypes "zotregistry.dev/zot/pkg/storage/types"
|
|
)
|
|
|
|
// NewObjectStorage returns a new image store backed by cloud storages.
|
|
// see https://github.com/docker/docker.github.io/tree/master/registry/storage-drivers
|
|
// Use the last argument to properly set a cache database, or it will default to boltDB local storage.
|
|
func NewImageStore(rootDir string, cacheDir string, dedupe, commit bool, log zlog.Logger,
|
|
metrics monitoring.MetricServer, linter common.Lint, store driver.StorageDriver, cacheDriver cache.Cache,
|
|
) storageTypes.ImageStore {
|
|
return imagestore.NewImageStore(
|
|
rootDir,
|
|
cacheDir,
|
|
dedupe,
|
|
commit,
|
|
log,
|
|
metrics,
|
|
linter,
|
|
New(store),
|
|
cacheDriver,
|
|
)
|
|
}
|