memory

package
v1.1.59 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2026 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPubSub

func NewPubSub(
	cfg *config.Configuration,
	logger *logger.Logger,
) pubsub.PubSub

NewPubSub creates a new memory-based pubsub

Types

type PubSub

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

PubSub implements both Publisher and Subscriber interfaces using watermill's gochannel

func (*PubSub) Close

func (p *PubSub) Close() error

Close closes both publisher and subscriber

func (*PubSub) Publish

func (p *PubSub) Publish(ctx context.Context, topic string, msg *message.Message) error

Publish publishes a webhook event

func (*PubSub) Subscribe

func (p *PubSub) Subscribe(ctx context.Context, topic string) (<-chan *message.Message, error)

Subscribe starts consuming webhook events

Jump to

Keyboard shortcuts

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