Help us shape the future of Go! Take the 2026 Go Developer Survey

eventstream

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package eventstream frames AWS Event Stream messages into raw inference stream frames. Bedrock ConverseStream uses this binary protocol rather than Server-Sent Events.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeStreamFrames

func DecodeStreamFrames(body io.ReadCloser) (*stream.StreamReader[stream.StreamFrame], error)

DecodeStreamFrames lazily decodes one AWS Event Stream message per Next call. The returned reader owns body and closes it when Close is called. A clean EOF is returned only when no bytes remain at the start of a new frame.

func Framer

func Framer() codec.StreamFramer

Framer returns the package's StreamFramer as an injectable value.

Types

type FramerError

type FramerError struct {
	Reason string
	Err    error
}

FramerError identifies a malformed AWS Event Stream frame or a read failure encountered while reading one. Err remains available through errors.Is/As.

func (*FramerError) Error

func (e *FramerError) Error() string

func (*FramerError) Unwrap

func (e *FramerError) Unwrap() error

Jump to

Keyboard shortcuts

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