Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrDecodePanic = errors.New("panic while decoding message queue")
ErrDecodePanic is returned when gob.Decode panics (malformed/corrupt input that trips an unchecked internal invariant rather than a clean error return).
Functions ¶
func DecodeMsgs ¶
DecodeMsgs takes a byte slice, decodes it as a GOB-encoded slice of msgtypes.Message, and returns the decoded slice and any decoding error.
The gob decoder is hardened against panics here: on-disk queue bytes may come from an older binary or have been corrupted on disk, and a few historical gob paths panic on malformed type metadata rather than returning an error. Wrapping Decode in defer/recover converts any such panic into a regular error so the caller can log and start fresh instead of crashing the whole daemon.
Types ¶
This section is empty.