store

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(o *Options)

Option Option

func Logger

func Logger(s logger.Logger) Option

func Name

func Name(s string) Option

type Options

type Options struct {
	Name   string
	Logger logger.Logger
}

func DefaultOptions

func DefaultOptions() Options

DefaultOptions default options

type Store

type Store interface {
	Push(t *task.Task) error   //添加任务
	Pop(t *task.Task) error    //剔除任务
	Clear(key string) error    //清空任务
	Update(t *task.Task) error //更新任务--重复调用Push其实就是update了。感觉这个有点多余
	//获取单个执行任务。
	ReadTask(key string) (*task.Task, error)

	//拉取所有任务队列.返回任务名称
	FetchJob(step int64) ([]string, error)
}
type Store struct {
	store StoreInterface
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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