events

package
v1.5.2 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEventBus

func NewEventBus(config *models.Config, ps models.PubSub) models.EventBus

func NewInMemoryPubSub

func NewInMemoryPubSub() models.PubSub

NewInMemoryPubSub creates an in-memory PubSub implementation.

func NewWatermillPubSub

func NewWatermillPubSub(publisher message.Publisher, subscriber message.Subscriber) models.PubSub

NewWatermillPubSub creates a PubSub adapter for Watermill transports. Users can pass any Watermill-compatible publisher and subscriber.

Types

type InMemoryPubSub

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

func (*InMemoryPubSub) Close

func (s *InMemoryPubSub) Close() error

func (*InMemoryPubSub) Publish

func (s *InMemoryPubSub) Publish(ctx context.Context, topic string, msg *models.Message) error

func (*InMemoryPubSub) Subscribe

func (s *InMemoryPubSub) Subscribe(ctx context.Context, topic string) (<-chan *models.Message, error)

Jump to

Keyboard shortcuts

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