Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Fx = fx.Options( fx.Provide(NewDestinations), fx.Provide(NewTransformer), fx.Invoke(StartDestinationSender), )
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 (d *Destination1) Deliver(ctx context.Context, e event.DestinationEvent) error
func (*Destination1) Id ¶
func (d *Destination1) Id() string
func (*Destination1) Transform ¶
func (d *Destination1) Transform(e event.SourceEvent) (event.DestinationEvent, error)
type Destination2 ¶
type Destination2 struct {
// contains filtered or unexported fields
}
func (*Destination2) Deliver ¶
func (d *Destination2) Deliver(ctx context.Context, e event.DestinationEvent) error
func (*Destination2) Id ¶
func (d *Destination2) Id() string
func (*Destination2) Transform ¶
func (d *Destination2) Transform(e event.SourceEvent) (event.DestinationEvent, error)
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
Click to show internal directories.
Click to hide internal directories.