Documentation
¶
Index ¶
Constants ¶
View Source
const ( // Migration result constants for metrics. MigrationResultSuccess = "success" MigrationResultFailure = "failure" MigrationResultSkipped = "skipped" // Migration operation constants for metrics. MigrationOperationMigrate = "migrate" MigrationOperationDelete = "delete" // Migration type constants for metrics. MigrationTypeNarInfoToDB = "narinfo-to-db" )
Variables ¶
View Source
var ( // ErrCacheMaxSizeRequired is returned if --cache-lru-schedule was given but not --cache-max-size. ErrCacheMaxSizeRequired = errors.New("--cache-max-size is required when --cache-lru-schedule is specified") // ErrStorageConfigRequired is returned if neither local nor S3 storage is configured. ErrStorageConfigRequired = errors.New("either --cache-storage-local or --cache-storage-s3-bucket is required") ErrS3ConfigIncomplete = errors.New( "S3 requires --cache-storage-s3-endpoint, --cache-storage-s3-access-key-id, and --cache-storage-s3-secret-access-key", ) // ErrStorageConflict is returned if both local and S3 storage are configured. ErrStorageConflict = errors.New("cannot use both --cache-storage-local and --cache-storage-s3-bucket") // ErrUpstreamCacheRequired is returned if no upstream cache is configured. ErrUpstreamCacheRequired = errors.New("at least one --cache-upstream-url is required") // ErrRedisAddrsRequired is returned when Redis backend is selected but no addresses are provided. ErrRedisAddrsRequired = errors.New("--cache-lock-backend=redis requires --cache-redis-addrs to be set") // ErrUnknownLockBackend is returned when an unknown lock backend is specified. ErrUnknownLockBackend = errors.New("unknown lock backend") )
View Source
var ErrMigrationFailed = errors.New("narinfos failed to migrate")
ErrMigrationFailed is returned when one or more NarInfos fail to migrate.
View Source
var ErrStorageIterationNotSupported = errors.New("storage backend does not support iteration")
ErrStorageIterationNotSupported is returned when the storage backend does not support iteration.
View Source
var Version = "dev"
Version defines the version of the binary, and is meant to be set with ldflags at build time.
Functions ¶
func RecordMigrationBatchSize ¶ added in v0.8.0
RecordMigrationBatchSize records the size of a migration batch.
func RecordMigrationDuration ¶ added in v0.8.0
RecordMigrationDuration records the duration of a migration operation. operation should be one of MigrationOperation* constants. duration should be in seconds.
func RecordMigrationObject ¶ added in v0.8.1
RecordMigrationObject records an object migration operation. operation should be one of MigrationOperation* constants. result should be one of MigrationResult* constants.
Types ¶
Click to show internal directories.
Click to hide internal directories.