streams

package module
v1.8.3 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompileFromQueryable

func CompileFromQueryable[T any](items []T) *contracts.CompiledQueryable[T]

func MapStream

func MapStream[T any, M any](ctx context.Context, in <-chan T, mapper func(T) M) <-chan M

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 FromData

func FromData[T any](ctx context.Context, items []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]

Jump to

Keyboard shortcuts

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