wire

package
v0.10.5 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 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 EncodeResponse added in v0.10.1

func EncodeResponse(response model.Response) ([]byte, error)

EncodeResponse bounds the exact bytes sent on either API.

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

func WriteResponse added in v0.10.1

func WriteResponse(w io.Writer, response model.Response) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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