consumer

package
v0.0.0-...-b4fdffc Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConsumerHandler

type ConsumerHandler interface {
	Handle(ConsumerMessage) (map[string]interface{}, error)
}

type ConsumerMessage

type ConsumerMessage struct {
	QueueMessage *dto.QueueMessage
	// contains filtered or unexported fields
}

type ErrorMessage

type ErrorMessage struct {
	Source        string                 `json:"source,omitempty"`
	Input         map[string]interface{} `json:"input,omitempty"`
	Reason        string                 `json:"reason"`
	Output        map[string]interface{} `json:"output,omitempty"`
	SourceMessage *dto.QueueMessage      `json:"-"`
}

type NotifyEventHandler

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

func NewNotifyEventHandler

func NewNotifyEventHandler(rabbitMqClient *infra.RabbitMQ) *NotifyEventHandler

func (*NotifyEventHandler) Handle

func (h *NotifyEventHandler) Handle(message ConsumerMessage) (map[string]interface{}, error)

type NotifyEventMessageBody

type NotifyEventMessageBody struct {
	URL           string                 `json:"url"`
	ClientID      string                 `json:"client_id"`
	AssociationId string                 `json:"association_id"`
	Retries       int                    `json:"retries"`
	AuthProvider  string                 `json:"auth_provider"`
	Body          map[string]interface{} `json:"body"`
}

type PubsubConsumer

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

func NewPubsubConsumer

func NewPubsubConsumer(consumer ConsumerHandler, dynamoClient *infra.DynamodbClient, rabbitMqClient *infra.RabbitMQ, battery *infra.Battery) (*PubsubConsumer, error)

func (*PubsubConsumer) Consume

func (p *PubsubConsumer) Consume(wg *sync.WaitGroup)

type SQSConsumer

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

func NewSQSConsumer

func NewSQSConsumer(queueUrl, dlq string, sqsClient *sqs.SQS, consumer ConsumerHandler, maxNumberOfMessages int64, logManager *producer.LoggerManager, dynamoClient *infra.DynamodbClient) (*SQSConsumer, error)

func (*SQSConsumer) Init

func (c *SQSConsumer) Init(wg *sync.WaitGroup)

Jump to

Keyboard shortcuts

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