Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var NilID = ID(ulid.Nil)
NilID is a special ID.
Functions ¶
This section is empty.
Types ¶
type ID ¶
ID represents a unique ID for a message.
func NewIDFromString ¶
NewIDFromString returns a new id based on the string s, which should be a ULID.
type Interface ¶
type Interface interface {
// DriverName returns the name associated with this driver.
DriverName() string
// Delete deletes the queue with the given name.
Delete(context.Context, string) error
// Len returns the number of messages in the queue with the given name
// that are not awaiting acknowledgement.
Len(context.Context, string) (int, error)
// Get returns the ID and content of the next message from the queue
// with the given name. The message will be automatically requeued if
// it is not acknowledged or refreshed by the returned time.
Get(context.Context, string) (ID, []byte, time.Time, error)
// Put places a message with the given content on the queue with the
// given name.
Put(context.Context, string, []byte) error
// Refresh gets a new expiry time for the message with the given ID.
Refresh(context.Context, ID) (time.Time, error)
// Acknowledge removes the message with the given ID from its queue.
Acknowledge(context.Context, ID) error
// Requeue requeues the message with the given ID.
Requeue(context.Context, ID) error
}
Interface is the interface satisfied by a queuing system.
Click to show internal directories.
Click to hide internal directories.