tasks

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: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TypeBucketCreate   = "bucket:create"
	TypeBucketDelete   = "bucket:delete"
	TypeBucketSyncTags = "bucket:sync:tags"
	TypeBucketSyncACL  = "bucket:sync:acl"

	TypeObjectSync     = "object:sync"
	TypeObjectSyncTags = "object:sync:tags"
	TypeObjectSyncACL  = "object:sync:acl"

	TypeMigrateBucketListObjects = "migrate:bucket:list_objects"
	TypeMigrateObjCopy           = "migrate:object:copy"

	TypeApiCostEstimation     = "api:cost_estimation"
	TypeApiCostEstimationList = "api:cost_estimation:list"

	TypeConsistencyCheck          = "consistency"
	TypeConsistencyCheckList      = "consistency:list"
	TypeConsistencyCheckReadiness = "consistency:readiness"
	TypeConsistencyCheckResult    = "consistency:result"

	TypeApiZeroDowntimeSwitch = "api:switch_zero_downtime"
	TypeApiSwitchWithDowntime = "api:switch_w_downtime"
)

A list of task types.

View Source
const (
	QueueEventsDefault1           = "events1"
	QueueEvents2                  = "events2"
	QueueEvents3                  = "events3"
	QueueEvents4                  = "events4"
	QueueEventsHighest5           = "events5"
	QueueMigrateBucketListObjects = "migrate_bucket_list_obj"
	QueueMigrateObjCopyDefault1   = "migrate_obj_copy1"
	QueueMigrateObjCopy2          = "migrate_obj_copy2"
	QueueMigrateObjCopy3          = "migrate_obj_copy3"
	QueueMigrateObjCopy4          = "migrate_obj_copy4"
	QueueMigrateObjCopyHighest5   = "migrate_obj_copy5"
	QueueAPI                      = "api"
	QueueConsistencyCheck         = "consistency_check"
)

Variables

This section is empty.

Functions

Types

type BucketCreatePayload

type BucketCreatePayload struct {
	Sync
	Bucket   string
	Location string
}

type BucketDeletePayload

type BucketDeletePayload struct {
	Sync
	Bucket string
}

type BucketSyncACLPayload

type BucketSyncACLPayload struct {
	Bucket string
	Sync
}

type BucketSyncTagsPayload

type BucketSyncTagsPayload struct {
	Bucket string
	Sync
}

type ConsistencyCheckDeletePayload added in v0.5.14

type ConsistencyCheckDeletePayload struct {
	ID string
}

type ConsistencyCheckListPayload added in v0.5.14

type ConsistencyCheckListPayload struct {
	MigrateLocation
	Prefix       string
	ID           string
	StorageCount uint8
}

type ConsistencyCheckPayload added in v0.5.14

type ConsistencyCheckPayload struct {
	ID        string
	Locations []MigrateLocation
}

type ConsistencyCheckReadinessPayload added in v0.5.14

type ConsistencyCheckReadinessPayload struct {
	ID string
}

type CostEstimationListPayload

type CostEstimationListPayload struct {
	FromStorage string
	ToStorage   string
	Bucket      string
	Prefix      string
}

type CostEstimationPayload

type CostEstimationPayload struct {
	Sync
}

type MigrateBucketListObjectsPayload

type MigrateBucketListObjectsPayload struct {
	Sync
	Bucket string
	Prefix string
}

type MigrateLocation added in v0.5.14

type MigrateLocation struct {
	Storage string
	Bucket  string
	User    string
}

type MigrateObjCopyPayload

type MigrateObjCopyPayload struct {
	Sync
	Bucket string
	Obj    ObjPayload
}

type ObjInfo

type ObjInfo struct {
	Name      string
	VersionID string
}

type ObjPayload

type ObjPayload struct {
	Name        string
	VersionID   string
	ETag        string
	Size        int64
	ContentType string
}

type ObjSyncACLPayload

type ObjSyncACLPayload struct {
	Object dom.Object
	Sync
}

type ObjSyncTagsPayload

type ObjSyncTagsPayload struct {
	Object dom.Object
	Sync
}

type ObjectSyncPayload

type ObjectSyncPayload struct {
	Object dom.Object
	Sync

	//FromVersion int64
	ObjSize int64
	Deleted bool
}

type Opt

type Opt interface {
	// contains filtered or unexported methods
}

func WithPriority

func WithPriority(p Priority) Opt

type Priority

type Priority uint8
const (
	PriorityDefault1 Priority = iota
	Priority2        Priority = iota
	Priority3        Priority = iota
	Priority4        Priority = iota
	PriorityHighest5 Priority = iota
)

func (Priority) ConsistencyCheckQueue added in v0.5.14

func (p Priority) ConsistencyCheckQueue() string

func (Priority) EventQueue

func (p Priority) EventQueue() string

func (Priority) MigrationQueue

func (p Priority) MigrationQueue() string

type SwitchWithDowntimePayload added in v0.5.14

type SwitchWithDowntimePayload struct {
	FromStorage string
	ToStorage   string
	User        string
	Bucket      string
	CreatedAt   time.Time
}

type Sync

type Sync struct {
	FromStorage string
	ToStorage   string
	ToBucket    *string
	CreatedAt   time.Time
}

func (*Sync) GetDate

func (t *Sync) GetDate() time.Time

func (*Sync) GetFrom

func (t *Sync) GetFrom() string

func (*Sync) GetToBucket added in v0.5.13

func (t *Sync) GetToBucket() *string

func (*Sync) GetToStorage added in v0.5.13

func (t *Sync) GetToStorage() string

func (*Sync) InitDate

func (t *Sync) InitDate()

func (*Sync) SetFrom

func (t *Sync) SetFrom(from string)

func (*Sync) SetTo

func (t *Sync) SetTo(storage string, bucket *string)

type SyncTask

type SyncTask interface {
	GetFrom() string
	GetToStorage() string
	GetToBucket() *string
	SetFrom(from string)
	SetTo(storage string, bucket *string)
	InitDate()
	GetDate() time.Time
}

type ZeroDowntimeReplicationSwitchPayload added in v0.5.14

type ZeroDowntimeReplicationSwitchPayload struct {
	Sync
	Bucket string
	User   string
}

Jump to

Keyboard shortcuts

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