Discover Packages
github.com/illyasch/saga-service
pkg
data
queue
package
Version:
v0.0.0-...-e360745
Opens a new window with list of versions in this module.
Published: Sep 26, 2022
License: Apache-2.0
Opens a new window with license information.
Imports: 8
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
type Command struct {
SagaID uuid .UUID `json:"saga_id"`
Name string `json:"name"`
}
Start polling the incoming queue and calls target's ProcessMessage method for each received message.
The message is removed from the queue if the processing was successful.
TODO Add concurrency calling ProcessMessage with limiting goroutines number.
Receiver struct holds functionality to receive messages off of an SQS queue.
NewReceiver function returns a configured Receiver with sqs connection, queue name, config, and logger used.
DeleteMessage deletes a message with a receipt handle.
ReceiveMessages returns slice of messages from the queue.
type Response struct {
SagaID uuid .UUID `json:"saga_id"`
Service string `json:"service"`
Status string `json:"status"`
}
Sender struct holds functionality to send notifications to an SQS queue.
NewSender returns a new Sender instance with SQS connection, queue name, logger, and notification store configured.
Send method sends a passed message to the queue.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.