pipeline

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: May 26, 2019 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	//ErrFailedCreateFile is for the pipeline failed at creating a new file
	ErrFailedCreateFile = errors.NewError("Failed to create a new temporary file", 0)
	//ErrFailedExecPipe is for the pipeline failed at one of the pipes
	ErrFailedExecPipe = errors.NewError("Failed to execute a pipe in the pipeline", 1)
)

Functions

func ExecPipeline

func ExecPipeline(data []byte, pipes ...Pipe) ([]byte, errors.Error)

ExecPipeline is a pipeline executer, data is the input data into the first function, retdata is a pointer to where you want the return data to be. Make sure it ais a pointer. A pipeline is a set of fuctions that eacht take a file location and process everything based on that. For example in modules.go there are .GetPipe methods for all module types, these take the variable and return a pipe. At the start of the pipe the provided data is put in, at the end the data is read from the same file.

Types

type Pipe

type Pipe func([]byte) ([]byte, errors.Error)

Pipe is a type used for pipes

Jump to

Keyboard shortcuts

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