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 ¶
func NewChannelStreamResult ¶
func NewChannelStreamResult(ch <-chan any, closeFn func() error) StreamResult
NewChannelStreamResult constructs a StreamResult from a channel and a close function.
Click to show internal directories.
Click to hide internal directories.