infrastructure

package
v0.0.0-...-059733a Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CassandraEventStore

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

func NewCassandraEventStore

func NewCassandraEventStore(session *gocql.Session) (*CassandraEventStore, error)

func (CassandraEventStore) GetEvents

func (ces CassandraEventStore) GetEvents(aggregateType es.AggregateType, aggregateID es.AggregateID) ([]es.Event, error)

func (CassandraEventStore) StoreEvents

func (ces CassandraEventStore) StoreEvents(ctx context.Context, events []es.Event) error

type EventHandler

type EventHandler interface {
	HandleEvent(ctx context.Context, event eventsourcing.EventData) error
	Events() []eventsourcing.EventType
	Name() string
}

type KafkaEventMessaging

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

func NewKafkaEventMessaging

func NewKafkaEventMessaging(brokers []string, topic string, logger *slog.Logger) (*KafkaEventMessaging, error)

func (*KafkaEventMessaging) Close

func (c *KafkaEventMessaging) Close()

func (*KafkaEventMessaging) ConsumeEvents

func (c *KafkaEventMessaging) ConsumeEvents(ctx context.Context, handler EventHandler) error

func (*KafkaEventMessaging) PublishEvents

func (p *KafkaEventMessaging) PublishEvents(ctx context.Context, events []eventsourcing.Event) error

Jump to

Keyboard shortcuts

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