message

package
v0.1.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 5, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL