Home Reference Source
import {Pipeline} from 'datamatic/src/Pipeline/Pipeline.js'
public class | source

Pipeline

Pipeline Class

Static Method Summary

Static Public Methods
public static

getExecs(_pvs: ...*): *

Constructor Summary

Public Constructor
public

constructor(pipesOrVOsOrSchemas: *)

Member Summary

Public Members
public get

errors: * | null: *

Returns validation errors

public get

schema: *[]: undefined[]

Returns arr

public get

Returns JSON-SCHEMA for pipeline output

public get

Returns write status of pipeline

Method Summary

Public Methods
public

Creates clone of current pipeline segment

public

Terminates input on pipeline segment.

public

link(target: *, callbacks: *): Pipeline

links pipeline segment to direct output to target pipeline

public

merge(pipeOrPipes: *, pipeOrSchema: *): Pipeline

Merges multiple pipes into single output

public

pipe(pipesOrSchemas: *): Pipeline

Creates new pipeline segment

public

async promise(data: *): Promise<Pipeline>

Convenience Method for Promise based flows.

public

sample(nth: *): Pipeline

Returns product of Nth occurrence of pipeline execution

public

split(schemasOrPipes: *): *

Creates array of new pipeline segments that run in parallel

public

subscribe(handler: *): Observable

Subscribes to pipeline output notifications

public

Provides current state of pipeline output.

public

throttle(rate: *): Pipeline

Informs Pipeline to rate limit notifications based on time interval

public

Provides current state of pipeline output.

public

Overrides Object's toString method

public

unlink(target: *): Pipeline

Unlink pipeline segment from target pipeline

public

unthrottle(discardCacheQueue: *)

Removes rate limiting from Pipeline and optionally deletes unprocessed cache items

public

write(data: *): Pipeline

Writes data to pipeline segment

public

yield(data: *): generator

Iterates pipeline callbacks via generator function

Static Public Methods

public static getExecs(_pvs: ...*): * source

Params:

NameTypeAttributeDescription
_pvs ...*

Return:

*

Public Constructors

public constructor(pipesOrVOsOrSchemas: *) source

Params:

NameTypeAttributeDescription
pipesOrVOsOrSchemas *

Public Members

public get errors: * | null: * source

Returns validation errors

Return:

* | null

public get schema: *[]: undefined[] source

Returns arr

Return:

*[]

public get schemas: object: undefined[] source

Returns JSON-SCHEMA for pipeline output

Return:

object

public get writable: boolean: * source

Returns write status of pipeline

Return:

boolean

Public Methods

public clone(): Pipeline source

Creates clone of current pipeline segment

Return:

Pipeline

public close(): Pipeline source

Terminates input on pipeline segment. This is irrevocable

Return:

Pipeline

links pipeline segment to direct output to target pipeline

Params:

NameTypeAttributeDescription
target *
callbacks *

function[]

Return:

Pipeline

public merge(pipeOrPipes: *, pipeOrSchema: *): Pipeline source

Merges multiple pipes into single output

Params:

NameTypeAttributeDescription
pipeOrPipes *
pipeOrSchema *

Return:

Pipeline

public pipe(pipesOrSchemas: *): Pipeline source

Creates new pipeline segment

Params:

NameTypeAttributeDescription
pipesOrSchemas *

Return:

Pipeline

public async promise(data: *): Promise<Pipeline> source

Convenience Method for Promise based flows. Writes data to pipeline and wraps observer in Promise

Params:

NameTypeAttributeDescription
data *

Return:

Promise<Pipeline>

public sample(nth: *): Pipeline source

Returns product of Nth occurrence of pipeline execution

Params:

NameTypeAttributeDescription
nth *

Return:

Pipeline

public split(schemasOrPipes: *): * source

Creates array of new pipeline segments that run in parallel

Params:

NameTypeAttributeDescription
schemasOrPipes *

Return:

*

public subscribe(handler: *): Observable source

Subscribes to pipeline output notifications

Params:

NameTypeAttributeDescription
handler *

Return:

Observable

public tap(): Object | Array source

Provides current state of pipeline output. alias for toJSON

Return:

Object | Array

public throttle(rate: *): Pipeline source

Informs Pipeline to rate limit notifications based on time interval

Params:

NameTypeAttributeDescription
rate *

Return:

Pipeline

public toJSON(): Object | Array source

Provides current state of pipeline output.

Return:

Object | Array

public toString(): String source

Overrides Object's toString method

Return:

String

Unlink pipeline segment from target pipeline

Params:

NameTypeAttributeDescription
target *

Return:

Pipeline

public unthrottle(discardCacheQueue: *) source

Removes rate limiting from Pipeline and optionally deletes unprocessed cache items

Params:

NameTypeAttributeDescription
discardCacheQueue *

public write(data: *): Pipeline source

Writes data to pipeline segment

Params:

NameTypeAttributeDescription
data *

Return:

Pipeline

public yield(data: *): generator source

Iterates pipeline callbacks via generator function

Params:

NameTypeAttributeDescription
data *

Return:

generator