models

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2018 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Code

type Code string

Code is the script code

func (Code) Configure

func (c Code) Configure(name string) error

Configure saves code to a file and builds plugin

type Data added in v0.1.7

type Data []byte

Data is what is passes by pipeline stages

func NewData added in v0.1.7

func NewData() Data

NewData returns default data

func (Data) Unmarshal added in v0.1.7

func (d Data) Unmarshal(value interface{}) error

Unmarshal calls json.Unmarshal on Data into value

type DataProcessor added in v0.1.7

type DataProcessor interface {
	ProcessData(
		input Data,
		outputChan chan Data,
		killChan chan error,
	)
}

DataProcessor is a pipeline stage

type ETL

type ETL interface {
	Extract() DataProcessor
	Transform() DataProcessor
	Load() DataProcessor
}

ETL defines an ETL

type Job

type Job struct {
	Name string
	Code Code
	// contains filtered or unexported fields
}

Job has the ETL description

func (*Job) Configure

func (j *Job) Configure() error

Configure loads the job plugin

func (*Job) Execute

func (j *Job) Execute() error

Execute ...

type Pipeline added in v0.1.7

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

Pipeline contains stages and executes them in order

func NewPipeline added in v0.1.7

func NewPipeline(stages ...DataProcessor) *Pipeline

NewPipeline create pipeline with stages

func (*Pipeline) Run added in v0.1.7

func (p *Pipeline) Run() chan error

Run executes stages and return chan of error at first error on at the end of stages

Jump to

Keyboard shortcuts

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