engine

package
v0.0.0-...-e00298a Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNotFound -
	ErrNotFound = errors.New("ErrNotFound")
)

Functions

This section is empty.

Types

type Buffer

type Buffer interface {
	Append(*collection.Document) error
	AppendBatch(...collection.Document) error
	Flush() error
	Flusher() func()

	Close()
}

Buffer -

func DefaultBuffer

func DefaultBuffer(collec *collection.Collection, outputs map[string]output.Interface) Buffer

DefaultBuffer creates a new buffer

func RedisBuffer

func RedisBuffer(collec *collection.Collection, redisCfg *config.Redis, outputs map[string]output.Interface) Buffer

RedisBuffer -

type Collector

type Collector interface {
	Collect(collectionName collection.Name, docBytes []byte) error
	CollectBatch(collectionName collection.Name, docBytesSlice ...[]byte) error
}

Collector collects documents

type Dispatcher

type Dispatcher interface {
	Dispatch(document *collection.Document) error
	DispatchBatch(documents ...collection.Document) error
}

Dispatcher dispatches documents

type Engine

type Engine interface {
	Collector
	Dispatcher
}

Engine -

func New

func New(cfg *config.Config) (Engine, error)

New - Create new service for serving web REST requests

Jump to

Keyboard shortcuts

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