pool

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrJobNotExist error job is not exists
	ErrJobNotExist = errors.New("job is not exists")
	// ErrVersionNotSame error job version is not same
	ErrVersionNotSame = errors.New("version is not same")
)

Functions

This section is empty.

Types

type Pool

type Pool interface {
	CreateJob(topic job.Topic, id job.ID,
		delay job.Delay, ttr job.TTR, body job.Body, override bool) (*job.Job, error)
	LoadReadyJob(topic job.Topic, id job.ID, version job.Version) (*job.Job, error)
	DeleteJob(topic job.Topic, id job.ID) error
}

Pool is an interface for manage information of jobs.

func New

func New(s store.Store, l log.Logger) Pool

New a pool with logger and storage

Jump to

Keyboard shortcuts

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