runner

package
v0.0.0-...-bd4732b Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MapResult

type MapResult struct {
	Key  string
	Path string
}

type MapStage

type MapStage struct {
	ID         string
	Dir        string
	ResultsDir string
}

func (MapStage) CollectResults

func (m MapStage) CollectResults() ([]MapResult, error)

type Mapper

type Mapper interface {
	Map(context.Context, MapStage, []byte) ([]MapResult, error)
}

type MapperFunc

type MapperFunc func(context.Context, MapStage, []byte) ([]MapResult, error)

func (MapperFunc) Map

func (f MapperFunc) Map(ctx context.Context, stage MapStage, chunk []byte) ([]MapResult, error)

type Reducer

type Reducer interface {
	Reduce(key string, paths []string, out io.Writer) error
}

type ReducerFunc

type ReducerFunc func(string, []string, io.Writer) error

func (ReducerFunc) Reduce

func (f ReducerFunc) Reduce(key string, paths []string, out io.Writer) error

type Runner

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

func NewRunner

func NewRunner(mapper Mapper, reducer Reducer, root string) (*Runner, error)

func (*Runner) Run

func (r *Runner) Run(ctx context.Context, c chunker.Chunker) error

Jump to

Keyboard shortcuts

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