streaming

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2025 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chunk

type Chunk struct {
	Chunk *types.Response
	Error error
}

func (*Chunk) ToMarshalable

func (rc *Chunk) ToMarshalable() ChunkMarshalable

type ChunkMarshalable

type ChunkMarshalable struct {
	Chunk *types.Response `json:"chunk,omitempty"`
	Error string          `json:"error,omitempty"`
}

type ContentAccumulator

type ContentAccumulator struct {
	Response types.Response
	// contains filtered or unexported fields
}

func NewContentAccumulator

func NewContentAccumulator() ContentAccumulator

func (*ContentAccumulator) AddChunk

func (acc *ContentAccumulator) AddChunk(chunk *types.Response) error

func (ContentAccumulator) HasFinished

func (acc ContentAccumulator) HasFinished() bool

type ErrChunkAddition

type ErrChunkAddition struct {
	Accumulator types.Response
	Chunk       *types.Response
}

func (ErrChunkAddition) Error

func (e ErrChunkAddition) Error() string

type ResponseChannel

type ResponseChannel chan Chunk

func NewResponseChannel

func NewResponseChannel(size ...int) ResponseChannel

func (ResponseChannel) Close

func (rs ResponseChannel) Close()

func (ResponseChannel) Drain

func (rs ResponseChannel) Drain() int

func (ResponseChannel) Next

func (rs ResponseChannel) Next() (*types.Response, error)

func (ResponseChannel) Send

func (rs ResponseChannel) Send(data *types.Response)

func (ResponseChannel) SendErr

func (rs ResponseChannel) SendErr(err error)

Jump to

Keyboard shortcuts

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