Documentation
¶
Index ¶
Constants ¶
View Source
const ( ErrUnmarshal int = -1 ErrMarshal int = -2 ErrDriver int = -3 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Consumer ¶
type Consumer[T json.Unmarshaler] struct { // contains filtered or unexported fields }
func NewConsumer ¶
NewConsumer creates a new consumer for the given T type of messages
func (*Consumer[T]) Ack ¶
Ack explicitly acknowldge the message handling. It can be implemented as No Operation for some drivers.
func (*Consumer[T]) Consume ¶
Consume retrieves messages from the given queue. Any provided options will be sent to the underlying driver. The messages are indefinetely consumed from the queue and sent to the chan Message[T].
type Message ¶
type Message[T json.Unmarshaler] struct { Content T ID string Error error }
sub := squeue.NewConsumer[*myMessage](d)
for m := range sub.Consume() { do something with m }
Directories
¶
Path | Synopsis |
---|---|
internal
|
|
examples/memory
command
|
|
examples/sqs/consumer
command
|
|
examples/sqs/producer
command
|
|
mocks
Package mock_sqs is a generated GoMock package.
|
Package mock_sqs is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.