bridge

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultTopicPrefix = "es.aggregate."

Variables

This section is empty.

Functions

func NewLogger

func NewLogger(level string, format string) *zap.SugaredLogger

Types

type Duplicate

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

func NewDuplicate

func NewDuplicate() *Duplicate

func (*Duplicate) Ensure

func (d *Duplicate) Ensure(e *db.Event)

func (*Duplicate) Exists

func (d *Duplicate) Exists(e *db.Event) bool

type ErrorHandlerFunc

type ErrorHandlerFunc func(ctx context.Context, err error)

type Sync

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

func New

func New(
	db db.DB,
	pub kafka.Publisher,
	dup *Duplicate,
	sc *stats.Collector,
	logger *zap.SugaredLogger,
	options ...SyncOption,
) *Sync

func (*Sync) Close

func (s *Sync) Close() (err error)

func (*Sync) Run

func (s *Sync) Run(ctx context.Context) error

type SyncOption

type SyncOption func(s *Sync)

func TopicPrefix

func TopicPrefix(prefix string) SyncOption

Jump to

Keyboard shortcuts

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