jobs

package
v4.0.0-alpha1 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2022 License: AGPL-3.0 Imports: 25 Imported by: 0

Documentation

Overview

Package jobs implements persistence of the job definition. For the time being, only BoltDB persistence is implemented.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDAO

func NewDAO(dao dao.DAO) dao.DAO

Types

type BoltStore

type BoltStore struct {
	boltdb.DAO
}

func NewBoltStore

func NewBoltStore(dao boltdb.DAO) (*BoltStore, error)

func (*BoltStore) DeleteJob

func (s *BoltStore) DeleteJob(jobID string) error

func (*BoltStore) DeleteTasks

func (s *BoltStore) DeleteTasks(jobId string, taskId []string) error

func (*BoltStore) GetJob

func (s *BoltStore) GetJob(jobId string, withTasks jobs.TaskStatus) (*jobs.Job, error)

func (*BoltStore) ListJobs

func (s *BoltStore) ListJobs(owner string, eventsOnly bool, timersOnly bool, withTasks jobs.TaskStatus, jobIDs []string, taskCursor ...int32) (chan *jobs.Job, chan bool, error)

func (*BoltStore) ListTasks

func (s *BoltStore) ListTasks(jobId string, taskStatus jobs.TaskStatus, cursor ...int32) (chan *jobs.Task, chan bool, error)

func (*BoltStore) PutJob

func (s *BoltStore) PutJob(job *jobs.Job) error

func (*BoltStore) PutTask

func (s *BoltStore) PutTask(task *jobs.Task) error

func (*BoltStore) PutTasks

func (s *BoltStore) PutTasks(tasks map[string]map[string]*jobs.Task) error

PutTasks batch updates DB with tasks organized by JobID and TaskID

type DAO

type DAO interface {
	dao.DAO
	PutJob(job *jobs.Job) error
	GetJob(jobId string, withTasks jobs.TaskStatus) (*jobs.Job, error)
	DeleteJob(jobId string) error
	ListJobs(owner string, eventsOnly bool, timersOnly bool, withTasks jobs.TaskStatus, jobIDs []string, taskCursor ...int32) (chan *jobs.Job, chan bool, error)

	PutTask(task *jobs.Task) error
	PutTasks(task map[string]map[string]*jobs.Task) error
	ListTasks(jobId string, taskStatus jobs.TaskStatus, cursor ...int32) (chan *jobs.Task, chan bool, error)
	DeleteTasks(jobId string, taskId []string) error
}

DAO provides method interface to access the store for scheduler job and task definitions.

Directories

Path Synopsis
Package grpc provides a gRPC service to access the store for scheduler job definitions.
Package grpc provides a gRPC service to access the store for scheduler job definitions.
Package rest provides a REST gateway to the job definition repository.
Package rest provides a REST gateway to the job definition repository.

Jump to

Keyboard shortcuts

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