Documentation
¶
Index ¶
- type Element
- type Queue
- func (q *Queue) Acknowledge(h uint32)
- func (q *Queue) CancelTimers()
- func (q *Queue) Elements() []Element
- func (q *Queue) GetStream() stream.C2S
- func (q *Queue) HandleIn()
- func (q *Queue) HandleOut(stanza stravaganza.Stanza)
- func (q *Queue) InboundH() uint32
- func (q *Queue) Len() int
- func (q *Queue) Nonce() []byte
- func (q *Queue) OutboundH() uint32
- func (q *Queue) RequestAck()
- func (q *Queue) ScheduleR()
- func (q *Queue) SendPending()
- func (q *Queue) SetStream(stm stream.C2S)
- type QueueMap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Element ¶
type Element struct { // Stanza contains the element stanza. Stanza stravaganza.Stanza // H contains the incremental h value associated to the element stanza. H uint32 }
Element defines a stream queue element type.
type Queue ¶
type Queue struct {
// contains filtered or unexported fields
}
Queue represents and c2s resumable queue.
func New ¶
func New( stm stream.C2S, nonce []byte, elements []Element, inH uint32, outH uint32, requestAckInterval time.Duration, waitForAckTimeout time.Duration, ) *Queue
New creates and initializes a new Queue instance.
func (*Queue) Acknowledge ¶
Acknowledge process and acknowledge a h value.
func (*Queue) CancelTimers ¶
func (q *Queue) CancelTimers()
CancelTimers cancels all queue internal timers.
func (*Queue) HandleOut ¶
func (q *Queue) HandleOut(stanza stravaganza.Stanza)
HandleOut process and outgoing queue stanza.
func (*Queue) RequestAck ¶
func (q *Queue) RequestAck()
RequestAck sends an r stanza to the queue internal stream.
func (*Queue) SendPending ¶
func (q *Queue) SendPending()
SendPending sends all pending stanzas to the queue internal stream.
type QueueMap ¶
type QueueMap struct {
// contains filtered or unexported fields
}
QueueMap defines a map of stream stanza queues.
func NewQueueMap ¶
func NewQueueMap() *QueueMap
NewQueueMap creates and initializes a new QueueMap instance.
Click to show internal directories.
Click to hide internal directories.