queue

package
v0.0.0-...-9021772 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2019 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ServiceProvider

type ServiceProvider struct{}

func (*ServiceProvider) Boot

func (s *ServiceProvider) Boot(app *glacier.Glacier)

func (*ServiceProvider) Daemon

func (s *ServiceProvider) Daemon(ctx context.Context, app *glacier.Glacier)

func (*ServiceProvider) Register

func (s *ServiceProvider) Register(app *container.Container)

type SyncQueue

type SyncQueue interface {
	// Enqueue 添加任务到队列
	Enqueue(jobs ...job.FileSyncJob) error
	// EnqueueOneByDef 根据定义名称添加任务到队列
	EnqueueOneByDef(def string) (*job.FileSyncJob, error)
	// Worker 执行任务队列消费
	Worker(ctx context.Context)
	// RunningJobs 获取运行中的任务
	RunningJobs() []storage.JobHistoryItem
}

SyncQueue 任务同步队列接口

func NewSyncQueue

func NewSyncQueue(cc *container.Container, queue storage.QueueStore, failedStore storage.FailedJobStore) SyncQueue

NewSyncQueue 创建一个任务队列

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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