Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultExchange = "events"
Variables ¶
View Source
var Module = fx.Options(
consumers,
consumerRunners,
consumerManager,
publishers,
)
Functions ¶
func NewRabbitMQPublisher ¶
Types ¶
type Consumer ¶
type Consumer interface {
Consume(ctx context.Context, runner ConsumerRunner)
}
type ConsumerManager ¶
type ConsumerManager struct {
ConsumerRunners []ConsumerRunner
}
func NewConsumerManager ¶
func NewConsumerManager(consumerRunners []ConsumerRunner) *ConsumerManager
func (ConsumerManager) Run ¶
func (c ConsumerManager) Run(ctx context.Context)
type ConsumerRunner ¶
type ConsumerRunner interface { Run(ctx context.Context) Do(ctx context.Context) Options() ConsumerRunnerOptions }
func NewSimpleConsumerRunner ¶
func NewSimpleConsumerRunner(consumer Consumer) ConsumerRunner
type ConsumerRunnerOptions ¶
type ConsumerRunnerOptions struct {
// contains filtered or unexported fields
}
type RabbitMQConsumer ¶
type RabbitMQConsumer struct {
// contains filtered or unexported fields
}
func (*RabbitMQConsumer) Consume ¶
func (c *RabbitMQConsumer) Consume(ctx context.Context, runner ConsumerRunner)
type RabbitMQPublisher ¶
type RabbitMQPublisher struct {
// contains filtered or unexported fields
}
type SimpleConsumerRunner ¶
type SimpleConsumerRunner struct {
// contains filtered or unexported fields
}
func (SimpleConsumerRunner) Do ¶
func (s SimpleConsumerRunner) Do(ctx context.Context)
func (SimpleConsumerRunner) Options ¶
func (s SimpleConsumerRunner) Options() ConsumerRunnerOptions
func (SimpleConsumerRunner) Run ¶
func (s SimpleConsumerRunner) Run(ctx context.Context)
Click to show internal directories.
Click to hide internal directories.