service

package
v0.0.0-...-b2c1117 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	JobNotFoundError = errors.New("uuid not found in job service")
	StepsNotSetError = errors.New("steps have not set to this job")
)

Functions

This section is empty.

Types

type JobServiceApp

type JobServiceApp interface {
	CreateJob() *module.Job
	StartAJob(uuid string, steps *stepModule.Step) (*module.Job, error)
	CancelAJob(uuid string) (*module.Job, error)
	GetJobResult(uuid string) (*stepModule.StepResult, error)
	GetAJob(uu string) (*module.Job, error)
}

func NewJobServiceApp

func NewJobServiceApp(mss stepService.StepServiceApp) JobServiceApp

type JobServiceAppImpl

type JobServiceAppImpl struct {
	// todo: monitor long term jobs, mention user to delete it
	Jobs        map[string]*module.Job
	StepService stepService.StepServiceApp
}

func (JobServiceAppImpl) CancelAJob

func (j JobServiceAppImpl) CancelAJob(uu string) (*module.Job, error)

func (JobServiceAppImpl) CreateJob

func (j JobServiceAppImpl) CreateJob() *module.Job

func (JobServiceAppImpl) GetAJob

func (j JobServiceAppImpl) GetAJob(uu string) (*module.Job, error)

func (JobServiceAppImpl) GetJobResult

func (j JobServiceAppImpl) GetJobResult(uu string) (*stepModule.StepResult, error)

func (JobServiceAppImpl) StartAJob

func (j JobServiceAppImpl) StartAJob(uu string, step *stepModule.Step) (*module.Job, error)

Jump to

Keyboard shortcuts

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