storage

package
v0.5.15 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 22, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConsistencyCheckObject added in v0.5.14

type ConsistencyCheckObject struct {
	ConsistencyCheckID string
	Storage            string
	Prefix             string
}

type ConsistencyCheckRecord added in v0.5.14

type ConsistencyCheckRecord struct {
	ConsistencyCheckID string
	Storage            string
	Object             string
	ETag               string
	StorageCount       uint8
}

type ConsistencyCheckResultEntry added in v0.5.14

type ConsistencyCheckResultEntry struct {
	Object   string
	ETag     string
	Storages []string
}

type ConsistencyCheckResultPage added in v0.5.14

type ConsistencyCheckResultPage struct {
	Entries []ConsistencyCheckResultEntry
	Cursor  uint64
}

type Service

type Service interface {
	GetLastListedObj(ctx context.Context, task tasks.MigrateBucketListObjectsPayload) (string, error)
	SetLastListedObj(ctx context.Context, task tasks.MigrateBucketListObjectsPayload, val string) error
	DelLastListedObj(ctx context.Context, task tasks.MigrateBucketListObjectsPayload) error
	CleanLastListedObj(ctx context.Context, fromStor, toStor, fromBucket string, toBucket *string) error

	StoreUploadID(ctx context.Context, user, bucket, object, uploadID string, ttl time.Duration) error
	DeleteUploadID(ctx context.Context, user, bucket, object, uploadID string) error
	ExistsUploadID(ctx context.Context, user, bucket, object, uploadID string) (bool, error)
	ExistsUploads(ctx context.Context, user, bucket string) (bool, error)

	GetLastListedConsistencyCheckObj(ctx context.Context, obj *ConsistencyCheckObject) (string, error)
	SetLastListedConsistencyCheckObj(ctx context.Context, obj *ConsistencyCheckObject, value string) error
	DeleteLastListedConsistencyCheckObj(ctx context.Context, obj *ConsistencyCheckObject) error
	DeleteAllLastListedConsistencyCheckObj(ctx context.Context, id string) error
	IncrementConsistencyCheckScheduledCounter(ctx context.Context, id string, count int64) error
	IncrementConsistencyCheckCompletedCounter(ctx context.Context, id string, count int64) error
	DecrementConsistencyCheckScheduledCounter(ctx context.Context, id string, count int64) error
	DecrementConsistencyCheckCompletedCounter(ctx context.Context, id string, count int64) error
	GetConsistencyCheckScheduledCounter(ctx context.Context, id string) (uint64, error)
	GetConsistencyCheckCompletedCounter(ctx context.Context, id string) (uint64, error)
	DeleteConsistencyCheckScheduledCounter(ctx context.Context, id string) error
	DeleteConsistencyCheckCompletedCounter(ctx context.Context, id string) error
	StoreConsistencyCheckID(ctx context.Context, id string) error
	HasConsistencyCheckID(ctx context.Context, id string) (bool, error)
	DeleteConsistencyCheckID(ctx context.Context, id string) error
	ListConsistencyCheckIDs(ctx context.Context) ([]string, error)
	AddToConsistencyCheckSet(ctx context.Context, record *ConsistencyCheckRecord) error
	FindConsistencyCheckSets(ctx context.Context, id string) ([]ConsistencyCheckResultEntry, error)
	FindConsistencyCheckSetsPageable(ctx context.Context, id string, cursor uint64, pageSize int64) (*ConsistencyCheckResultPage, error)
	HasConsistencyCheckSets(ctx context.Context, id string) (bool, error)
	DeleteAllConsistencyCheckSets(ctx context.Context, id string) error
	SetConsistencyCheckReadiness(ctx context.Context, id string, ready bool) error
	GetConsistencyCheckReadiness(ctx context.Context, id string) (bool, error)
	DeleteConsistencyCheckReadiness(ctx context.Context, id string) error
	SetConsistencyCheckStorages(ctx context.Context, id string, storages []string) error
	GetConsistencyCheckStorages(ctx context.Context, id string) ([]string, error)
	DeleteConsistencyCheckStorages(ctx context.Context, id string) error
}

func New

func New(client redis.UniversalClient) Service

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL