scheduler

package
v0.2.1-0...-9c16218 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2020 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IOPersister

type IOPersister interface {
	Set(string, string) error
	Get(string) (string, error)
}

IOPersister is the interface that describes what is needed to persist Job IO data.

type Messager

type Messager interface {
	Request(subject string, v interface{}, vPtr interface{}, timeout time.Duration) error
	Subscribe(subject string, cb nats.Handler) (*nats.Subscription, error)
}

Messager is the interface that is needed to send and receive messages.

type Persister

type Persister interface {
	SetWorkflowStatus(context.Context, string, string) error
	SetJobStatus(context.Context, string, string) error
	SetJobExitCode(context.Context, string, int) error
}

Persister is the interface that describes what is needed to persist scheduler data.

type Scheduler

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

Scheduler represents an instance of the scheduler.

func New

func New(m Messager, p Persister, iop IOPersister) (*Scheduler, error)

New creates a new scheduler.

func (*Scheduler) AddWorkflow

func (s *Scheduler) AddWorkflow(ctx context.Context, w core.Workflow, jobs []core.Job, volumes map[string]core.Volume) error

AddWorkflow schedules a workflow for execution.

Jump to

Keyboard shortcuts

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