mirror of
https://github.com/project-zot/zot.git
synced 2026-06-18 21:48:04 +08:00
48d44ce2a5
Currently, zot uses one of the existing repos as the master copy for a blob to achieve dedupe, which complicates dedupe tracking logic. Furthermore, we have a global storage lock which is becoming a bottleneck. In order to move to a per-repo lock, we first need to simplify this logic. Now use a single hidden global repo (_blobstore/) as a blob store instead. Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
33 lines
1.0 KiB
Go
33 lines
1.0 KiB
Go
package constants
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
const (
|
|
// BlobUploadDir defines the upload directory for blob uploads.
|
|
BlobUploadDir = ".uploads"
|
|
SchemaVersion = 2
|
|
DefaultFilePerms = 0o600
|
|
DefaultDirPerms = 0o700
|
|
RLOCK = "RLock"
|
|
RWLOCK = "RWLock"
|
|
BlobsCache = "blobs"
|
|
DuplicatesBucket = "duplicates"
|
|
OriginalBucket = "original"
|
|
DBExtensionName = ".db"
|
|
DBCacheLockCheckTimeout = 10 * time.Second
|
|
BoltdbName = "cache"
|
|
DynamoDBDriverName = "dynamodb"
|
|
RedisDriverName = "redis"
|
|
RedisLocksBucket = "locks"
|
|
DefaultGCDelay = 1 * time.Hour
|
|
DefaultGCInterval = 1 * time.Hour
|
|
S3StorageDriverName = "s3"
|
|
GCSStorageDriverName = "gcs"
|
|
LocalStorageDriverName = "local"
|
|
// GlobalBlobsRepo is the internal directory used as the master copy location for deduped blobs.
|
|
// It uses a leading underscore to ensure it can never collide with a valid OCI repository name.
|
|
GlobalBlobsRepo = "_blobstore"
|
|
)
|