jobs

package
v2.0.3+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2020 License: AGPL-3.0 Imports: 17 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

This section is empty.

Types

type BoltStore

type BoltStore struct {
	// contains filtered or unexported fields
}

func NewBoltStore

func NewBoltStore(fileName string) (*BoltStore, error)

func (*BoltStore) Close

func (b *BoltStore) Close()

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 added in v1.5.0

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 {
	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