tasks

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 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"
	TypeApiReplicationSwitch  = "api:replication_switch"
)

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"
)

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 CostEstimationListPayload

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

type CostEstimationPayload

type CostEstimationPayload struct {
	Sync
}

type FinishReplicationSwitchPayload added in v0.5.2

type FinishReplicationSwitchPayload struct {
	User   string
	Bucket string
}

type MigrateBucketListObjectsPayload

type MigrateBucketListObjectsPayload struct {
	Sync
	Bucket string
	Prefix 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) EventQueue

func (p Priority) EventQueue() string

func (Priority) MigrationQueue

func (p Priority) MigrationQueue() string

type Sync

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

func (*Sync) GetDate

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

func (*Sync) GetFrom

func (t *Sync) GetFrom() string

func (*Sync) GetTo

func (t *Sync) GetTo() string

func (*Sync) InitDate

func (t *Sync) InitDate()

func (*Sync) SetFrom

func (t *Sync) SetFrom(from string)

func (*Sync) SetTo

func (t *Sync) SetTo(to string)

type SyncTask

type SyncTask interface {
	GetFrom() string
	GetTo() string
	SetFrom(from string)
	SetTo(to string)
	InitDate()
	GetDate() time.Time
}

Jump to

Keyboard shortcuts

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