utils

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrStreamerClosed = errors.New("stream closed")

Functions

This section is empty.

Types

type StreamWaitFn

type StreamWaitFn func() error

StreamWaitFn is a method used to wait for a stream to end, catching any error in the process.

func NewStreamer

func NewStreamer[Data any](ctx context.Context, callback StreamerCallback[Data]) (<-chan Data, StreamWaitFn)

type StreamerCallback

type StreamerCallback[Data any] func(ctx context.Context, inC chan<- Data) error

Jump to

Keyboard shortcuts

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