Documentation ¶
Index ¶
- type Queue
- func (q *Queue) Enqueue(p io.Reader) error
- func (q *Queue) Leave() error
- func (q *Queue) Peek() (queue.Entry, error)
- func (q *Queue) Quarantine() error
- func (q *Queue) Reader() (io.Reader, error)
- func (q *Queue) Remove() error
- func (q *Queue) Wait() chan struct{}
- func (q *Queue) WaitForEmpty() chan struct{}
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 - basic memory based queue
func (*Queue) Leave ¶
Leave implements Entry.Leave - the entry (will be returned on subsequent calls to Peek)
func (*Queue) Quarantine ¶
Quarantine implements Entry.Quarantine - Flag that this entry has an error (remove from queue, potentially retaining data with error flagged)
func (*Queue) Reader ¶
Reader implements Entry.Reader - As the entry will always be the first item in the queue this is implemented against Queue rather than as a separate struct.
func (*Queue) Wait ¶
func (q *Queue) Wait() chan struct{}
Wait returns a channel that is closed when there is something in the queue
func (*Queue) WaitForEmpty ¶
func (q *Queue) WaitForEmpty() chan struct{}
WaitForEmpty returns a channel which will be closed when the queue is empty
Click to show internal directories.
Click to hide internal directories.