api

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

API package with type definitions

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BatchTrigger

type BatchTrigger interface {
	Done(ctx context.Context, item interface{}, index int64) bool
}

BatchTrigger interface provides logic to trigger when batch is done.

type BatchTriggerFunc

type BatchTriggerFunc func(context.Context, interface{}, int64) bool

BatchTriggerFunc a function type adapter that implements BatchTrigger

func (BatchTriggerFunc) Done

func (f BatchTriggerFunc) Done(ctx context.Context, item interface{}, index int64) bool

Done implements BatchOperation.Done

type BinFunc

type BinFunc func(context.Context, interface{}, interface{}) (interface{}, error)

BinFunc implements BinOperation as type func(context.Context, interface{}, interface{})

func (BinFunc) Apply

func (f BinFunc) Apply(ctx context.Context, op1, op2 interface{}) (interface{}, error)

Apply implements BinOpeartion.Apply

type BinOperation

type BinOperation interface {
	Apply(ctx context.Context, op1, op2 interface{}) (interface{}, error)
}

BinOperation interface represents binary opeartions (i.e. Reduce, etc)

type Collector

type Collector interface {
	SetInput(<-chan interface{})
}

type Emitter

type Emitter interface {
	GetOutput() <-chan interface{}
}

type Operator

type Operator interface {
	Collector
	Emitter
	Exec(drain chan<- error)
}

Operator is an executor node that applies a function on items in the stream

type ProcError

type ProcError struct {
	Err      error
	ProcName string
}

func (ProcError) Error

func (e ProcError) Error() string

type Sink

type Sink interface {
	Collector
	Open(context.Context) <-chan error
}

type Source

type Source interface {
	Emitter
	Open(context.Context) error
}

type UnFunc

type UnFunc func(context.Context, interface{}) (interface{}, error)

UnFunc implements UnOperation as type func (context.Context, interface{})

func (UnFunc) Apply

func (f UnFunc) Apply(ctx context.Context, data interface{}) (interface{}, error)

Apply implements UnOperation.Apply method

type UnOperation

type UnOperation interface {
	Apply(ctx context.Context, data interface{}) (interface{}, error)
}

UnOperation interface represents unary operations (i.e. Map, Filter, etc)

Directories

Path Synopsis
Package context wraps built-in type context.Context.
Package context wraps built-in type context.Context.

Jump to

Keyboard shortcuts

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