publishmq

package
v0.1.0-alpha.3 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidTopic = errors.New("invalid topic")
)

Functions

func NewMessageHandler

func NewMessageHandler(eventHandler EventHandler) consumer.MessageHandler

func WithQueue

func WithQueue(queueConfig *mqs.QueueConfig) func(opts *PublishMQOption)

Types

type EventHandler

type EventHandler interface {
	Handle(ctx context.Context, event *models.Event) error
}

func NewEventHandler

func NewEventHandler(
	logger *otelzap.Logger,
	redisClient *redis.Client,
	deliveryMQ *deliverymq.DeliveryMQ,
	entityStore models.EntityStore,
	eventTracer eventtracer.EventTracer,
	topics []string,
) EventHandler

type PublishMQ

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

func New

func New(opts ...func(opts *PublishMQOption)) *PublishMQ

func (*PublishMQ) Subscribe

func (q *PublishMQ) Subscribe(ctx context.Context) (mqs.Subscription, error)

type PublishMQOption

type PublishMQOption struct {
	QueueConfig *mqs.QueueConfig
}

Jump to

Keyboard shortcuts

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