Documentation
¶
Index ¶
Constants ¶
View Source
const ( RedisType = "redis" InMemoryType = "inmemory" )
View Source
const ( DestinationNamespace = "destination" HTTPAdapterNamespace = "http" )
Variables ¶
View Source
var (
ErrQueueClosed = errors.New("queue is closed")
)
View Source
var (
ErrQueueEmpty = errors.New("queue is empty")
)
Functions ¶
This section is empty.
Types ¶
type ConcurrentLinkedQueue ¶
type ConcurrentLinkedQueue struct {
// contains filtered or unexported fields
}
ConcurrentLinkedQueue concurrent queue
func NewConcurrentLinkedQueue ¶
func NewConcurrentLinkedQueue(maxSize uint32) *ConcurrentLinkedQueue
NewConcurrentLinkedQueue Creates a new queue
func (*ConcurrentLinkedQueue) Close ¶
func (c *ConcurrentLinkedQueue) Close()
func (*ConcurrentLinkedQueue) Dequeue ¶
func (c *ConcurrentLinkedQueue) Dequeue() (interface{}, error)
func (*ConcurrentLinkedQueue) Enqueue ¶
func (c *ConcurrentLinkedQueue) Enqueue(data interface{}) error
func (*ConcurrentLinkedQueue) GetMaxSize ¶
func (c *ConcurrentLinkedQueue) GetMaxSize() uint32
func (*ConcurrentLinkedQueue) GetSize ¶
func (c *ConcurrentLinkedQueue) GetSize() uint32
type InMemory ¶
type InMemory struct {
// contains filtered or unexported fields
}
func (*InMemory) BufferSize ¶
func (*InMemory) Pop ¶
Pop dequeues an element (if exist) or waits until the next element gets enqueued and returns it. Multiple calls to DequeueOrWaitForNextElement() would enqueue multiple "listeners" for future enqueued elements.
type Queue ¶
type Queue interface { io.Closer Push(interface{}) error Pop() (interface{}, error) Size() int64 BufferSize() int64 Type() string }
func NewInMemory ¶
type Redis ¶
type Redis struct {
// contains filtered or unexported fields
}
Redis is a queue implementation based on Redis it is used blocking pop (BLPOP) command for getting elements from queue
func (*Redis) BufferSize ¶
Click to show internal directories.
Click to hide internal directories.