Documentation
¶
Index ¶
- Variables
- type BuildFlow
- type BuildSink
- type BuildSource
- type Command
- type Emittable
- type EmittableInlet
- type EmittableInline
- type Event
- type EventType
- type FanInWorker
- type Flow
- type FlowBuilder
- type FlowBuilderFunc
- type FlowGraph
- func Drop(n uint64) FlowGraph
- func DropWhile[T any](f func(T) bool) FlowGraph
- func Filter[T any](f func(T) bool) FlowGraph
- func FlowFunc[T, K any](f func(T) (K, error)) FlowGraph
- func Fold[T, K any](k K, f func(K, T) K) FlowGraph
- func Map[T, K any](f func(T) K) FlowGraph
- func Reduce[T any](f func(T, T) T) FlowGraph
- func Take(n uint64) FlowGraph
- func TakeWhile[T any](f func(T) bool) FlowGraph
- type FlowGraphFunc
- type FlowHandler
- type FlowHandlerFunc
- type Graph
- type IOlet
- type Inlet
- type InletChan
- type Inline
- type Outlet
- type OutletChan
- type Outline
- type Pipe
- type Runnable
- type SinkBuilder
- type SinkBuilderFunc
- type SinkHandler
- type SinkHandlerFunc
- type SourceBuilder
- type SourceBuilderFunc
- type SourceGraph
- type SourceGraphFunc
- func (sg SourceGraphFunc) Await() error
- func (sg SourceGraphFunc) AwaitWithContext(ctx context.Context) error
- func (sg SourceGraphFunc) Build() Inline
- func (sg SourceGraphFunc) Execute() (any, error)
- func (sg SourceGraphFunc) ExecuteWithContext(ctx context.Context) (any, error)
- func (sg SourceGraphFunc) From(source SourceBuilder) Graph
- func (sg SourceGraphFunc) Run() <-chan any
- func (sg SourceGraphFunc) RunWithContext(ctx context.Context) <-chan any
- func (sg SourceGraphFunc) To(sink SinkBuilder) Graph
- func (sg SourceGraphFunc) Via(flow FlowBuilder) Graph
- type SourceHandler
- type SourceHandlerFunc
- type StartFunc
Constants ¶
This section is empty.
Variables ¶
View Source
var Next = errors.New("next")
Functions ¶
This section is empty.
Types ¶
type BuildFlow ¶
type BuildFlow func() FlowHandler
type BuildSink ¶
type BuildSink func() SinkHandler
type BuildSource ¶
type BuildSource func() SourceHandler
func (BuildSource) Build ¶
func (bs BuildSource) Build() Inline
type EmittableInlet ¶
type EmittableInline ¶
type FanInWorker ¶
type Flow ¶
type Flow struct { Pull func(IOlet) Cancel func(IOlet) Push func(IOlet, any) Error func(IOlet, error) Complete func(Outlet) }
func (Flow) OnComplete ¶
type FlowBuilder ¶
type FlowBuilderFunc ¶
func (FlowBuilderFunc) Build ¶
func (fbf FlowBuilderFunc) Build(in Inline) Inline
type FlowGraph ¶
type FlowGraph interface { FlowBuilder Via(FlowBuilder) FlowGraph To(SinkBuilder) SinkBuilder }
type FlowGraphFunc ¶
type FlowGraphFunc func() FlowBuilder
func (FlowGraphFunc) Build ¶
func (fgf FlowGraphFunc) Build(in Inline) Inline
func (FlowGraphFunc) From ¶
func (fgf FlowGraphFunc) From(source SourceBuilder) Graph
func (FlowGraphFunc) To ¶
func (fgf FlowGraphFunc) To(sink SinkBuilder) SinkBuilder
func (FlowGraphFunc) Via ¶
func (fgf FlowGraphFunc) Via(flow FlowBuilder) FlowGraph
type FlowHandler ¶
type FlowHandlerFunc ¶
func (FlowHandlerFunc[T, K]) OnCancel ¶
func (FlowHandlerFunc[T, K]) OnCancel(iolet IOlet)
func (FlowHandlerFunc[T, K]) OnComplete ¶
func (FlowHandlerFunc[T, K]) OnComplete(outlet Outlet)
func (FlowHandlerFunc[T, K]) OnError ¶
func (FlowHandlerFunc[T, K]) OnError(iolet IOlet, e error)
func (FlowHandlerFunc[T, K]) OnPull ¶
func (FlowHandlerFunc[T, K]) OnPull(iolet IOlet)
func (FlowHandlerFunc[T, K]) OnPush ¶
func (fhf FlowHandlerFunc[T, K]) OnPush(iolet IOlet, v any)
type Graph ¶
type Graph interface { Runnable From(SourceBuilder) Graph Via(FlowBuilder) Graph To(SinkBuilder) Graph }
func Join ¶
func Join(sources ...SourceBuilder) Graph
func Merge ¶
func Merge(sources ...SourceBuilder) Graph
func NewFanIn ¶
func NewFanIn(worker FanInWorker, sources ...SourceBuilder) Graph
type OutletChan ¶
type OutletChan chan<- Event
func (OutletChan) Complete ¶
func (oc OutletChan) Complete()
func (OutletChan) Error ¶
func (oc OutletChan) Error(e error)
func (OutletChan) Push ¶
func (oc OutletChan) Push(v any)
type SinkBuilder ¶
func Empty ¶
func Empty() SinkBuilder
func ForEach ¶
func ForEach[T any](f func(T)) SinkBuilder
func Printf ¶
func Printf(format string) SinkBuilder
func Println ¶
func Println() SinkBuilder
func SinkFunc ¶
func SinkFunc[T any](f func(T) error) SinkBuilder
type SinkBuilderFunc ¶
func (SinkBuilderFunc) Build ¶
func (sbf SinkBuilderFunc) Build(in Inline) Runnable
type SinkHandler ¶
type SinkHandler interface { OnPush(EmittableInlet, any) OnError(EmittableInlet, error) OnComplete(Emittable) }
type SinkHandlerFunc ¶
func (SinkHandlerFunc[T]) OnComplete ¶
func (SinkHandlerFunc[T]) OnComplete(emittable Emittable)
func (SinkHandlerFunc[T]) OnError ¶
func (SinkHandlerFunc[T]) OnError(inlet EmittableInlet, e error)
func (SinkHandlerFunc[T]) OnPush ¶
func (shf SinkHandlerFunc[T]) OnPush(inlet EmittableInlet, v any)
type SourceBuilder ¶
type SourceBuilder interface {
Build() Inline
}
type SourceBuilderFunc ¶
type SourceBuilderFunc func() Inline
func (SourceBuilderFunc) Build ¶
func (sbf SourceBuilderFunc) Build() Inline
type SourceGraph ¶
type SourceGraph interface { SourceBuilder Graph }
func Slice ¶
func Slice[T any](slice []T) SourceGraph
func SourceFunc ¶
func SourceFunc[T any](f func() (T, error)) SourceGraph
func ZeroSource ¶
func ZeroSource() SourceGraph
type SourceGraphFunc ¶
type SourceGraphFunc func() SourceBuilder
func (SourceGraphFunc) Await ¶
func (sg SourceGraphFunc) Await() error
func (SourceGraphFunc) AwaitWithContext ¶
func (sg SourceGraphFunc) AwaitWithContext(ctx context.Context) error
func (SourceGraphFunc) Build ¶
func (sg SourceGraphFunc) Build() Inline
func (SourceGraphFunc) Execute ¶
func (sg SourceGraphFunc) Execute() (any, error)
func (SourceGraphFunc) ExecuteWithContext ¶
func (sg SourceGraphFunc) ExecuteWithContext(ctx context.Context) (any, error)
func (SourceGraphFunc) From ¶
func (sg SourceGraphFunc) From(source SourceBuilder) Graph
func (SourceGraphFunc) Run ¶
func (sg SourceGraphFunc) Run() <-chan any
func (SourceGraphFunc) RunWithContext ¶
func (sg SourceGraphFunc) RunWithContext(ctx context.Context) <-chan any
func (SourceGraphFunc) To ¶
func (sg SourceGraphFunc) To(sink SinkBuilder) Graph
func (SourceGraphFunc) Via ¶
func (sg SourceGraphFunc) Via(flow FlowBuilder) Graph
type SourceHandler ¶
type SourceHandlerFunc ¶
func (SourceHandlerFunc[T]) OnCancel ¶
func (SourceHandlerFunc[T]) OnCancel(outlet Outlet)
func (SourceHandlerFunc[T]) OnPull ¶
func (shf SourceHandlerFunc[T]) OnPull(outlet Outlet)
type StartFunc ¶
type StartFunc func() (<-chan any, context.CancelFunc)
Click to show internal directories.
Click to hide internal directories.