destination

package
v0.0.0-...-a9f5cd1 Latest Latest
Warning

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

Go to latest
Published: May 30, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func NewDestinations

func NewDestinations(logger *zap.Logger) *map[string]Destination

func StartDestinationSender

func StartDestinationSender(logger *zap.Logger, config *config.Config,
	baseCtx *config.BaseContext, destinations *map[string]Destination)

Types

type Destination

type Destination interface {
	Id() string
	Transform(event.SourceEvent) (event.DestinationEvent, error)
	Deliver(context.Context, event.DestinationEvent) error
}

type Destination1

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

func (*Destination1) Deliver

func (*Destination1) Id

func (d *Destination1) Id() string

func (*Destination1) Transform

type Destination2

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

func (*Destination2) Deliver

func (*Destination2) Id

func (d *Destination2) Id() string

func (*Destination2) Transform

type Transformer

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

func NewTransformer

func NewTransformer(logger *zap.Logger, writer *kafka.Writer, destinations *map[string]Destination) *Transformer

func (*Transformer) TransformAndStore

func (transformer *Transformer) TransformAndStore(ctx context.Context,
	sourceEvent event.SourceEvent) error

Jump to

Keyboard shortcuts

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