job

package
v0.0.1-0...-a0864a0 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Async

type Async struct {
	ID, Filepath, NodeID string
	Data                 payload.Data
	Job                  Job                      `json:"-"`
	JobResponseChan      <-chan response.Response `json:"-"`
}

Async to be persisted in local DB

func (*Async) Load

func (a *Async) Load(Payload payload.Payload) error

type Input

type Input struct {
	Job
	PipelineTag string
}

Input represent a job containing a streamable payload, Data, PipelineTag, and a response channel, response indicate whether the payload was successfully processed and propagated to the next destinations. PipelineTag indicate to which pipeline should this job be forwarded to.

type Job

type Job struct {
	// Payload is the message payload of this job.
	// is either a payload.Stream OR payload.Bytes.
	Payload payload.Payload

	// Data is the message data of this job.
	Data payload.Data

	// Context of the job
	Context context.Context

	// ResponseChan should receive a response at the end of a job,
	// The response itself indicates whether the payload was successfully processed and propagated
	// to the next destinations.
	ResponseChan chan<- response.Response
}

Job represent a job containing a streamable payload (the message) and a response channel, which is used to indicate whether the payload was successfully processed and propagated to the next destinations.

Jump to

Keyboard shortcuts

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