Documentation ¶
Index ¶
- type Client
- func (c *Client) Dequeue(ctx context.Context, opts client.QueueClientConfig) (*client.Message, error)
- func (c *Client) Enqueue(ctx context.Context, msg *client.Message, options ...client.EnqueueOptions) error
- func (c *Client) ExtendMessage(ctx context.Context, msg *client.Message) error
- func (c *Client) FinishMessage(ctx context.Context, msg *client.Message) error
- type InmemQueue
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is the queue client used for dev and test purpose.
func New ¶
func New(queue *InmemQueue) *Client
New creates the in-memory queue Client instance. Client will use the default global queue if queue is nil.
func NewNamedQueue ¶
New creates the named in-memory queue Client instance.
func (*Client) Dequeue ¶
func (c *Client) Dequeue(ctx context.Context, opts client.QueueClientConfig) (*client.Message, error)
Dequeue dequeues message from the in-memory queue.
func (*Client) Enqueue ¶
func (c *Client) Enqueue(ctx context.Context, msg *client.Message, options ...client.EnqueueOptions) error
Enqueue enqueues message to the in-memory queue.
func (*Client) ExtendMessage ¶
ExtendMessage extends the message lock.
type InmemQueue ¶
type InmemQueue struct {
// contains filtered or unexported fields
}
InmemQueue implements in-memory queue for dev/test
func NewInMemQueue ¶
func NewInMemQueue(lockDuration time.Duration) *InmemQueue
func (*InmemQueue) DeleteAll ¶
func (q *InmemQueue) DeleteAll()
func (*InmemQueue) Dequeue ¶
func (q *InmemQueue) Dequeue() *client.Message
func (*InmemQueue) Enqueue ¶
func (q *InmemQueue) Enqueue(msg *client.Message)
func (*InmemQueue) Len ¶
func (q *InmemQueue) Len() int
Click to show internal directories.
Click to hide internal directories.