simplestream

package module
v0.0.0-...-69db174 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2020 License: MIT Imports: 10 Imported by: 0

README

simplestream

A simple Go data streaming/processing framework

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasicProcessor

type BasicProcessor struct {
	Source
	Destination
}

func (*BasicProcessor) Process

func (s *BasicProcessor) Process(input interface{}) error

type CsvSource

type CsvSource struct {
	Reader    *csv.Reader
	RowDecode func(row []string, p interface{}) error
}

func (*CsvSource) Fetch

func (c *CsvSource) Fetch(p interface{}) error

type Destination

type Destination interface {
	Put(p interface{}) error
}

type DynamoDBDestination

type DynamoDBDestination struct {
	DB        *dynamodb.DynamoDB
	TableName string
}

func (*DynamoDBDestination) Put

func (d *DynamoDBDestination) Put(p interface{}) error

type ErrorDestination

type ErrorDestination struct {
	Output error
}

func (*ErrorDestination) Put

func (s *ErrorDestination) Put(p interface{}) error

type ErrorSource

type ErrorSource struct {
	Output error
}

func (*ErrorSource) Fetch

func (s *ErrorSource) Fetch(p interface{}) error

type ErrorTransformer

type ErrorTransformer struct{}

func (*ErrorTransformer) Transform

func (m *ErrorTransformer) Transform(input interface{}) (interface{}, error)

type FilterProcessor

type FilterProcessor struct {
	Source
	FilterConditionFunc func(input interface{}) bool
	Destination
}

func (*FilterProcessor) Process

func (s *FilterProcessor) Process(input interface{}) error

type IdentityTransformer

type IdentityTransformer struct {
	Transformers []Transformer
}

func (*IdentityTransformer) Transform

func (m *IdentityTransformer) Transform(input interface{}) (interface{}, error)

type Json

type Json struct {
	io.Reader
	io.Writer
}

func (*Json) Fetch

func (j *Json) Fetch(p interface{}) error

func (*Json) Put

func (j *Json) Put(p interface{}) error

type MultiTransformer

type MultiTransformer struct {
	Transformers []Transformer
}

func (*MultiTransformer) Transform

func (m *MultiTransformer) Transform(input interface{}) (interface{}, error)

type NoMoreSourceError

type NoMoreSourceError struct {
}

func (NoMoreSourceError) Error

func (n NoMoreSourceError) Error() string

type Processor

type Processor interface {
	Process(input interface{})
}

type Source

type Source interface {
	Fetch(p interface{}) error
}

type StringDestination

type StringDestination struct {
	Output *string
}

func (*StringDestination) Put

func (s *StringDestination) Put(p interface{}) error

type StringSource

type StringSource struct {
	Output string
}

func (*StringSource) Fetch

func (s *StringSource) Fetch(p interface{}) error

type TransformProcessor

type TransformProcessor struct {
	Source
	Transformer
	Destination
}

func (*TransformProcessor) Process

func (s *TransformProcessor) Process(input interface{}) error

type Transformer

type Transformer interface {
	Transform(input interface{}) (interface{}, error)
}

Jump to

Keyboard shortcuts

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