execution

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2018 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Execution

type Execution struct {
	ID                string
	Service           *service.Service
	Task              string
	CreatedAt         time.Time
	ExecutedAt        time.Time
	ExecutionDuration time.Duration
	Inputs            interface{}
	Output            string
	OutputData        interface{}
}

Execution is a type that store all informations about executions

func Create

func Create(service *service.Service, task string, inputs interface{}) (execution *Execution, err error)

Create an execution with a unique ID and put it in the pending list

func InProgress

func InProgress(ID string) (execution *Execution)

InProgress returns the matching in progress execution if exists

func (*Execution) Complete

func (execution *Execution) Complete(output string, data interface{}) (err error)

Complete mark an execution as complete and put it in the list of processed tasks

func (*Execution) Execute

func (execution *Execution) Execute() (err error)

Execute moves an exection from the pending to the in progress queue and publish the job for processing

Jump to

Keyboard shortcuts

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