Documentation ¶
Index ¶
- type Queue
- func (q *Queue) Cleanup(ctx context.Context, filter queues.FilterCleanup) error
- func (q *Queue) Dequeue(ctx context.Context, receiverTypes []string, batchSize int, ...) error
- func (q *Queue) Enqueue(ctx context.Context, ms ...notification.Message) error
- func (q *Queue) ErrorCallback(ctx context.Context, ms notification.Message) error
- func (q *Queue) ListMessages(ctx context.Context, notificationID string) ([]notification.Message, error)
- func (q *Queue) Stop(ctx context.Context) error
- func (q *Queue) SuccessCallback(ctx context.Context, ms notification.Message) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Queue ¶
type Queue struct {
// contains filtered or unexported fields
}
Queue simulates queue inmemory, this is for testing only not recommended to use this in production
func (*Queue) Dequeue ¶
func (q *Queue) Dequeue(ctx context.Context, receiverTypes []string, batchSize int, handlerFn func(context.Context, []notification.Message) error) error
Dequeue pop the queue based on specific filters (receiver types or batch size) and process the messages with handlerFn
func (*Queue) ErrorCallback ¶
ErrorCallback is a callback that will be called once the message is failed to be handled by handlerFn
func (*Queue) ListMessages ¶ added in v0.7.3
func (*Queue) Stop ¶
Stop is a inmemmory queue function this will close the channel to simulate queue
func (*Queue) SuccessCallback ¶
SuccessCallback is a callback that will be called once the message is succesfully handled by handlerFn
Click to show internal directories.
Click to hide internal directories.