transports

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2025 License: MPL-2.0 Imports: 1 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChannelStreamResult

type ChannelStreamResult struct {
	// contains filtered or unexported fields
}

ChannelStreamResult adapts a <-chan any into a StreamResult.

func (*ChannelStreamResult) Close

func (sr *ChannelStreamResult) Close() error

Close invokes the provided close function to terminate the stream.

func (*ChannelStreamResult) Next

func (sr *ChannelStreamResult) Next() (any, error)

Next returns the next element from the channel or io.EOF if closed.

type SliceStreamResult

type SliceStreamResult struct {
	// contains filtered or unexported fields
}

func NewSliceStreamResult

func NewSliceStreamResult(items []any, closeFn func() error) *SliceStreamResult

func (*SliceStreamResult) Close

func (sr *SliceStreamResult) Close() error

func (*SliceStreamResult) Next

func (sr *SliceStreamResult) Next() (any, error)

type StreamResult

type StreamResult interface {
	Next() (interface{}, error)
	Close() error
}

func NewChannelStreamResult

func NewChannelStreamResult(ch <-chan any, closeFn func() error) StreamResult

NewChannelStreamResult constructs a StreamResult from a channel and a close function.

Directories

Path Synopsis
sse_client_transport.go
sse_client_transport.go

Jump to

Keyboard shortcuts

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