queue

package
v0.26.1 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrQueueing = errors.New("problem with persistent queue")

Functions

func FetchFailedMsgs

func FetchFailedMsgs(eDB *db.Edb, queueKey []byte) []msgtypes.Message

FetchFailedMsgs fetches failed messages from a persistent queue identified by key and attempts to send them again. The function returns the list of failed messages.

The function assumes the database and the key are valid. If the key doesn't exist, it will be created.

If any of the operations fail, the function will log an error and return an empty list.

func StoreFailedMsgs

func StoreFailedMsgs(eDB *db.Edb, key []byte, g msgtypes.Message) error

StoreFailedMsgs stores a message in a persistent queue identified by key. The message is appended to any existing messages in the queue, and the queue is stored in the database using the given key.

The function assumes the database and the key are valid. If the key doesn't exist, it will be created.

If any of the operations fail, the function returns an error.

Types

This section is empty.

Jump to

Keyboard shortcuts

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