Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Memory ¶
type Memory struct {
// contains filtered or unexported fields
}
Memory is an implementation of the Queue that is purely in-memory
type MemoryMessage ¶
type MemoryMessage struct { Body []byte ID []byte Timestamp time.Time Topic string Channel string Requeued bool Delay time.Duration }
MemoryMessage is an impl of Message
func (*MemoryMessage) GetTimestamp ¶
func (m *MemoryMessage) GetTimestamp() time.Time
GetTimestamp returns the creation timestamp
type Message ¶
type Message interface { Finish() error GetBody() []byte GetID() []byte GetTimestamp() time.Time Requeue(delay time.Duration) error Touch() error }
Message is an abstracted interface for messages from the queue.
type NSQ ¶
type NSQ struct {
// contains filtered or unexported fields
}
NSQ is a queue implementation using the nsq client
type NSQMessage ¶
type NSQMessage struct {
*nsq.Message
}
NSQMessage wraps nsq.Message
func (*NSQMessage) GetBody ¶
func (n *NSQMessage) GetBody() []byte
GetBody returns body of the nsq message
func (*NSQMessage) GetTimestamp ¶
func (n *NSQMessage) GetTimestamp() time.Time
GetTimestamp converts the nsq timestamp to time.Time and returns it
Click to show internal directories.
Click to hide internal directories.