fanin

package
v0.0.0-...-e27a01c Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FullnessSynchronizer

type FullnessSynchronizer struct {
	// contains filtered or unexported fields
}

func NewFullnessSynchronizer

func NewFullnessSynchronizer(items, depth int) *FullnessSynchronizer

NewFullnessSynchronizer creates a synchronizer that emits data on fullness

func (*FullnessSynchronizer) Add

func (s *FullnessSynchronizer) Add(idx int, val any) []any

func (*FullnessSynchronizer) Close

func (s *FullnessSynchronizer) Close() error

type IntervalSynchronizer

type IntervalSynchronizer struct {
	// contains filtered or unexported fields
}

func NewIntervalSynchronizer

func NewIntervalSynchronizer(items, depth int, interval time.Duration) *IntervalSynchronizer

NewIntervalSynchronizer creates a synchronizer that emits data after elapsed interval unless it is empty

func (*IntervalSynchronizer) Add

func (s *IntervalSynchronizer) Add(idx int, val any) []any

func (*IntervalSynchronizer) Close

func (s *IntervalSynchronizer) Close() error

type Node

type Node[T any] struct {
	// contains filtered or unexported fields
}

func New

func New[T any](name string, synchro SynchronizerBuilder) *Node[T]

func (*Node[T]) Close

func (n *Node[T]) Close() error

func (*Node[T]) Connect

func (n *Node[T]) Connect(in ...graco.SourceEdge[T]) (graco.SourceEdge[[]T], error)

func (*Node[T]) Name

func (n *Node[T]) Name() string

func (*Node[T]) Start

func (n *Node[T]) Start(ctx context.Context) error

type PairMakerFunc

type PairMakerFunc[A, B, Res any] func(A, B) (Res, error)

type PairNode

type PairNode[A, B, Res any] struct {
	// contains filtered or unexported fields
}

func NewPair

func NewPair[A, B, Res any](name string, make PairMakerFunc[A, B, Res]) *PairNode[A, B, Res]

func (*PairNode[A, B, Res]) Close

func (n *PairNode[A, B, Res]) Close() error

func (*PairNode[A, B, Res]) Connect

func (n *PairNode[A, B, Res]) Connect(a graco.SourceEdge[A], b graco.SourceEdge[B]) (graco.SourceEdge[Res], error)

func (*PairNode[A, B, Res]) Name

func (n *PairNode[A, B, Res]) Name() string

func (*PairNode[A, B, Res]) Start

func (n *PairNode[A, B, Res]) Start(ctx context.Context) error

type Synchronizer

type Synchronizer interface {
	Add(idx int, val any) []any
	Close() error
}

type SynchronizerBuilder

type SynchronizerBuilder func(items int) (Synchronizer, error)

type TimestampSynchronizer

type TimestampSynchronizer struct {
	// contains filtered or unexported fields
}

func NewTimestampSynchronizer

func NewTimestampSynchronizer(items, depth int, delta time.Duration) *TimestampSynchronizer

func (*TimestampSynchronizer) Add

func (s *TimestampSynchronizer) Add(idx int, val any) []any

func (*TimestampSynchronizer) Close

func (s *TimestampSynchronizer) Close() error

type TripletMakerFunc

type TripletMakerFunc[A, B, C, Res any] func(A, B, C) (Res, error)

type TripletNode

type TripletNode[A, B, C, Res any] struct {
	// contains filtered or unexported fields
}

func NewTriplet

func NewTriplet[A, B, C, Res any](name string, make TripletMakerFunc[A, B, C, Res]) *TripletNode[A, B, C, Res]

func (*TripletNode[A, B, C, Res]) Close

func (n *TripletNode[A, B, C, Res]) Close() error

func (*TripletNode[A, B, C, Res]) Connect

func (n *TripletNode[A, B, C, Res]) Connect(a graco.SourceEdge[A], b graco.SourceEdge[B]) (graco.SourceEdge[Res], error)

func (*TripletNode[A, B, C, Res]) Name

func (n *TripletNode[A, B, C, Res]) Name() string

func (*TripletNode[A, B, C, Res]) Start

func (n *TripletNode[A, B, C, Res]) Start(ctx context.Context) error

type WithTimestamp

type WithTimestamp interface {
	Timestamp() time.Duration
}

Jump to

Keyboard shortcuts

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