kafka

package
v0.0.0-...-42841ab Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConsumerFtor

type ConsumerFtor func() (*kafka.Consumer, error)

func SingleConsumer

func SingleConsumer(appConfig config.IAppConfig) ConsumerFtor

func TransientConsumer

func TransientConsumer(appConfig config.IAppConfig) ConsumerFtor

type IConsumer

type IConsumer interface {
}

type IEmitter

type IEmitter interface {
	comps.IEmitter
}

func NewEmitter

func NewEmitter(name schema.Name,
	eventType behavior.EventType,
	evt2Fact behavior.Evt2FactFunc) (IEmitter, error)

type IKafkaBus

type IKafkaBus interface {
	comps.IBus
}

type IListener

type IListener[TFact contract.IFact, TCmd behavior.ICmd] interface {
	comps.IGenListener[*kafka.Event, TFact]
}

type IProducer

type IProducer interface {
}

type Listener

type Listener[TCmd behavior.ICmd] struct {
	*comps.Component
	Topic string
	// contains filtered or unexported fields
}

func (*Listener[TCmd]) Activate

func (l *Listener[TCmd]) Activate(ctx context.Context) error

func (*Listener[TCmd]) Deactivate

func (l *Listener[TCmd]) Deactivate(ctx context.Context) error

func (*Listener[TCmd]) IAmListener

func (l *Listener[TCmd]) IAmListener()

type ProducerFtor

type ProducerFtor func() (*kafka.Producer, error)

func Producer

func Producer(appConfig config.IAppConfig) ProducerFtor

Jump to

Keyboard shortcuts

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