Documentation ¶
Overview ¶
Package message implements utility structures and methods used by the FS client to manage messages.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RetryLoop ¶
func RetryLoop(in <-chan service.AckMessage, out chan<- comms.MessageInfo, stats stats.RetryLoopCollector, maxSize, maxCount int)
RetryLoop is a loop which reads from in and writes to out.
Messages are considered pending until MessageInfo.Ack is called and output again if MessageInfo.Nack is called. The loop will pause reading from input when at least maxSize bytes of messages, or maxCount messages are pending.
To shutdown gracefully, close out and Ack any pending messages.
func SortLoop ¶
func SortLoop(in <-chan comms.MessageInfo, out chan<- comms.MessageInfo, f *flow.Filter)
SortLoop connects in and out in a sorted manner. That is, it acts essentially as a buffered channel between in and out which sorts any messages within it. Caller is responsible for implementing any needed size limit. Returns when "in" is closed.
Types ¶
This section is empty.