relay

package
v0.0.0-...-aec1f2c Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2018 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithEmitter

func WithEmitter(ctx context.Context, e Emitter) context.Context

Types

type ElasticsearchIndexer

type ElasticsearchIndexer struct {
	Index    func(item interface{}) string
	Type     func(item interface{}) *string
	Id       func(item interface{}) *string
	BodyJson func(item interface{}) interface{}
}

type Emitter

type Emitter interface {
	scaffold.Contextualizer
	Emit(item interface{}) error
	Flush() error
}

func ContextEmitter

func ContextEmitter(ctx context.Context) Emitter

func NewElasticsearchEmitter

func NewElasticsearchEmitter(cfg services.ElasticsearchConfig, indexer ElasticsearchIndexer) Emitter

func NewKinesisEmitter

func NewKinesisEmitter(stream string) Emitter

func NewMultiEmitter

func NewMultiEmitter(emitters ...Emitter) Emitter

func NewNoopEmitter

func NewNoopEmitter() Emitter

Jump to

Keyboard shortcuts

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