pipeline

package
v2.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2020 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pipeline

type Pipeline struct {
	ChainFilter *filter.Chain
	// contains filtered or unexported fields
}

Pipeline is the object that process filters and outputs.

func NewPipeline

func NewPipeline(db store.DB, cacheRetention time.Duration) (*Pipeline, error)

NewPipeline creates a new pipeline

func (*Pipeline) AddOutput

func (p *Pipeline) AddOutput(def *model.OutputDef) (model.OutputProvider, error)

AddOutput add an output to the pipeline

func (*Pipeline) GetAvailableOutputs

func (p *Pipeline) GetAvailableOutputs() []model.Spec

GetAvailableOutputs get all available outputs

func (*Pipeline) GetOutput

func (p *Pipeline) GetOutput(id int) (model.OutputProvider, error)

GetOutput retrieve an output of the pipeline

func (*Pipeline) GetOutputDefs

func (p *Pipeline) GetOutputDefs() []model.OutputDef

GetOutputDefs return all output definitions of the pipeline

func (*Pipeline) Process

func (p *Pipeline) Process(articles []*model.Article) uint64

Process articles

func (*Pipeline) RemoveOutput

func (p *Pipeline) RemoveOutput(output *model.OutputDef) error

RemoveOutput removes an output from the pipeline

func (*Pipeline) UpdateOutput

func (p *Pipeline) UpdateOutput(output *model.OutputDef) (model.OutputProvider, error)

UpdateOutput update an output of the pipeline

Jump to

Keyboard shortcuts

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