projection

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Projector

type Projector interface {
	WithSchedules(bus event.Bus, store event.Store) Schedules
	HandleJob(projection.Job) error
}

type Registerer

type Registerer interface {
	// RegisterEventHandler registers an event handler for the given event name.
	RegisterEventHandler(eventName string, handler func(event.Event) error)
}

type Schedules

type Schedules = map[string]projection.Schedule

type Worker

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

func New

func New(bus event.Bus, store event.Store, reg *codec.Registry, opts ...WorkerOption) *Worker

func (*Worker) Start

func (svc *Worker) Start(ctx context.Context) (<-chan error, error)

type WorkerOption

type WorkerOption func(*Worker)

func WithLogger

func WithLogger(logger *zap.SugaredLogger) WorkerOption

func WithProjector

func WithProjector(projector Projector) WorkerOption

func WithSchedules

func WithSchedules(schedules Schedules) WorkerOption

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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