projector

package
v0.0.0-...-1e1f105 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterKafkaProjector

func RegisterKafkaProjector(name string, offsetRepo *mongodb.Repo, outboxRepo *mongodb.Repo, writer *kafka.Writer, c outbox.IConverter)

RegisterKafkaProjector is to register a kafka projector, which will publish outbox events to kafka

Types

type KafkaProjector

type KafkaProjector struct {
	Writer *kafka.Writer
	// contains filtered or unexported fields
}

KafkaProjector is concrete implementation of IProjector for kafka

func (*KafkaProjector) AssignProjectorID

func (p *KafkaProjector) AssignProjectorID(offsetRepo *mongodb.Repo)

AssignProjectorID is the implemention of IProjector interface

func (*KafkaProjector) Bit

func (p *KafkaProjector) Bit() int32

Bit is the implemention of IProjector interface

func (*KafkaProjector) Converter

func (p *KafkaProjector) Converter() outbox.IConverter

Converter is the implemention of IProjector interface

func (*KafkaProjector) Name

func (p *KafkaProjector) Name() string

Name is the implemention of IProjector interface

func (*KafkaProjector) OffsetRepo

func (p *KafkaProjector) OffsetRepo() *mongodb.Repo

OffsetRepo is the implemention of IProjector interface

func (*KafkaProjector) OutboxRepo

func (p *KafkaProjector) OutboxRepo() *mongodb.Repo

OutboxRepo is the implemention of IProjector interface

func (*KafkaProjector) WriteToReadside

func (p *KafkaProjector) WriteToReadside(ctx context.Context, key string, data interface{}) error

WriteToReadside is the implemention of IProjector interface TODO: Need ckt breaker if kafka is not available

Jump to

Keyboard shortcuts

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