worker

package
v0.0.19 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2020 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMapper added in v0.0.18

func NewMapper(resource *model.Resource) mapreduce.Mapper

func NewReducer added in v0.0.18

func NewReducer(s store.Store) mapreduce.Reducer

func NewShuffler added in v0.0.18

func NewShuffler(size int) mapreduce.Shuffler

Types

type Mapper added in v0.0.18

type Mapper struct {
	// contains filtered or unexported fields
}

func (*Mapper) Map added in v0.0.18

func (m *Mapper) Map(ctx context.Context, rows <-chan []string, entities chan<- mapreduce.Entity) error

type Reducer added in v0.0.18

type Reducer struct {
	// contains filtered or unexported fields
}

func (*Reducer) Reduce added in v0.0.18

func (r *Reducer) Reduce(ctx context.Context, batches <-chan []mapreduce.Entity) error

type Shuffler added in v0.0.18

type Shuffler struct {
	// contains filtered or unexported fields
}

func (*Shuffler) Shuffle added in v0.0.18

func (s *Shuffler) Shuffle(ctx context.Context, entities <-chan mapreduce.Entity, batches chan<- []mapreduce.Entity) error

type Worker

type Worker struct {
	// contains filtered or unexported fields
}

Worker is responsible for processing incoming data.

func New

func New(s store.Store) *Worker

New returns new instance of worker.

func (*Worker) ModifiedResources

func (w *Worker) ModifiedResources() (map[string]time.Time, error)

func (*Worker) Process

func (w *Worker) Process(ctx context.Context, resources <-chan govdata.Resource) error

Process dispatches event as to a handler.

Jump to

Keyboard shortcuts

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