Documentation
¶
Index ¶
- func CompileFromQueryable[T any](items []T) *contracts.CompiledQueryable[T]
- func MapStream[T any, M any](ctx context.Context, in <-chan T, mapper func(T) M) <-chan M
- type Streamable
- func FromChannel[T any](ctx context.Context, items <-chan T) Streamable[T]
- func FromCsv[T any](ctx context.Context, Conf contracts.CsvStreamConf[T]) Streamable[T]
- func FromData[T any](ctx context.Context, items []T) Streamable[T]
- func FromJsonArr[T any](ctx context.Context, Conf contracts.StreamConf) Streamable[T]
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompileFromQueryable ¶
func CompileFromQueryable[T any](items []T) *contracts.CompiledQueryable[T]
Types ¶
type Streamable ¶
type Streamable[T any] struct { Channel <-chan T Context context.Context BufferSize int Err []error Initiated bool }
func FromChannel ¶
func FromChannel[T any](ctx context.Context, items <-chan T) Streamable[T]
func FromCsv ¶
func FromCsv[T any](ctx context.Context, Conf contracts.CsvStreamConf[T]) Streamable[T]
func FromJsonArr ¶
func FromJsonArr[T any](ctx context.Context, Conf contracts.StreamConf) Streamable[T]
func (Streamable[T]) FilterStream ¶
func (currStr Streamable[T]) FilterStream(Filter func(T) bool) Streamable[T]
func (Streamable[T]) TakeAll ¶
func (currStr Streamable[T]) TakeAll() []T
func (Streamable[T]) Throttle ¶
func (currStr Streamable[T]) Throttle(duration time.Duration) Streamable[T]
Click to show internal directories.
Click to hide internal directories.