envelope

package
v0.17.9 Latest Latest
Warning

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

Go to latest
Published: May 4, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package envelope is the JSON shape of every message published on <org_id>.<handle>.broadcast (per WIRE.md §3).

Index

Constants

View Source
const MaxBytes = 65536 // 64 KiB cap on the encoded envelope.

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

type Message struct {
	ID        string    `json:"id"`
	Handle    string    `json:"handle"`
	Payload   string    `json:"payload"`
	CreatedAt time.Time `json:"created_at"`
}

func New

func New(handle, payload string, now time.Time) Message

func Unmarshal

func Unmarshal(b []byte) (Message, error)

func (Message) Marshal

func (m Message) Marshal() ([]byte, error)

Jump to

Keyboard shortcuts

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