codec

package
v0.34.1 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package codec serialises and deserialises the persistent failed-message queue using CBOR (RFC 8949) via github.com/fxamacker/cbor. Despite the historical name "encdec", no encryption is performed: the queue is stored in plaintext CBOR inside the local sqlite database. The on-disk database is operator-owned, so confidentiality is assumed at the filesystem level rather than at the payload level.

Index

Constants

This section is empty.

Variables

View Source
var ErrDecodePanic = errors.New("panic while decoding message queue")

ErrDecodePanic signals cbor.Decode panicked on malformed input rather than returning cleanly.

Functions

func DecodeMsgs

func DecodeMsgs(val []byte) (msgs []msgtypes.Message, err error)

DecodeMsgs CBOR-decodes val into a message slice. A decode panic on corrupted or older-format on-disk bytes is recovered into ErrDecodePanic so a bad queue entry never crashes the daemon.

func EncodeMsgs

func EncodeMsgs(msgs []msgtypes.Message) ([]byte, error)

EncodeMsgs encodes a given list of messages using CBOR encoding and returns the []byte representation of the messages. If there is an error during encoding, the function returns it.

Types

This section is empty.

Jump to

Keyboard shortcuts

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