wire

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package wire frames JSON control messages without consuming streamed payloads.

Index

Constants

View Source
const MaxFrame = 8 << 20

Variables

View Source
var ErrFrameTooLarge = errors.New("control message exceeds 8 MiB")

Functions

func BoundResponse added in v0.4.0

func BoundResponse(response model.Response) model.Response

BoundResponse lets both peer and local API callers receive an actionable error even when a provider returns more than the control protocol can carry.

func ReadFrame

func ReadFrame(r io.Reader, value any) error

func ReadFrameLimit

func ReadFrameLimit(r io.Reader, value any, limit uint32) error

func WriteFrame

func WriteFrame(w io.Writer, value any) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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