Documentation ¶
Index ¶
- Constants
- func Chan(inp ...float64) (out <-chan float64)
- func ChanFloat32(inp ...float32) (out <-chan float32)
- func ChanFloat32FuncErr(act func() (float32, error)) (out <-chan float32)
- func ChanFloat32FuncNok(act func() (float32, bool)) (out <-chan float32)
- func ChanFloat32Slice(inp ...[]float32) (out <-chan float32)
- func ChanFuncErr(act func() (float64, error)) (out <-chan float64)
- func ChanFuncNok(act func() (float64, bool)) (out <-chan float64)
- func ChanSlice(inp ...[]float64) (out <-chan float64)
- func Daisy(inp <-chan float64, tube Tube) (out <-chan float64)
- func DaisyChain(inp <-chan float64, tubes ...Tube) (out <-chan float64)
- func Done(inp <-chan float64) (done <-chan struct{})
- func DoneFloat32(inp <-chan float32) (done <-chan struct{})
- func DoneFloat32Func(inp <-chan float32, act func(a float32)) (out <-chan struct{})
- func DoneFloat32Slice(inp <-chan float32) (done <-chan ([]float32))
- func DoneFunc(inp <-chan float64, act func(a float64)) (out <-chan struct{})
- func DoneSlice(inp <-chan float64) (done <-chan ([]float64))
- func Float32Daisy(inp <-chan float32, tube Float32Tube) (out <-chan float32)
- func Float32DaisyChain(inp <-chan float32, tubes ...Float32Tube) (out <-chan float32)
- func Join(out chan<- float64, inp ...float64) (done <-chan struct{})
- func JoinChan(out chan<- float64, inp <-chan float64) (done <-chan struct{})
- func JoinFloat32(out chan<- float32, inp ...float32) (done <-chan struct{})
- func JoinFloat32Chan(out chan<- float32, inp <-chan float32) (done <-chan struct{})
- func JoinFloat32Slice(out chan<- float32, inp ...[]float32) (done <-chan struct{})
- func JoinSlice(out chan<- float64, inp ...[]float64) (done <-chan struct{})
- func MakeChan() (out chan float64)
- func MakeFloat32Chan() (out chan float32)
- func Merge(inps ...<-chan float64) (out <-chan float64)
- func MergeFloat32(inps ...<-chan float32) (out <-chan float32)
- func PipeBuffer(inp <-chan float64, cap int) (out <-chan float64)
- func PipeFloat32Buffer(inp <-chan float32, cap int) (out <-chan float32)
- func PipeFloat32Fork(inp <-chan float32) (out1, out2 <-chan float32)
- func PipeFloat32Func(inp <-chan float32, act func(a float32) float32) (out <-chan float32)
- func PipeFork(inp <-chan float64) (out1, out2 <-chan float64)
- func PipeFunc(inp <-chan float64, act func(a float64) float64) (out <-chan float64)
- func SendProxy(out chan<- float64) chan<- float64
- func SendProxyFloat32(out chan<- float32) chan<- float32
- type BasicInfo
- type BasicKind
- type Float32Tube
- type Tube
Constants ¶
const CAP = 10
CAP is the capacity of the buffered proxy channel
const Float32CAP = 10
Float32CAP is the capacity of the buffered proxy channel
const Float32QUE = 16
Float32QUE is the allocated size of the circular queue
const QUE = 16
QUE is the allocated size of the circular queue
Variables ¶
This section is empty.
Functions ¶
func ChanFloat32 ¶
ChanFloat32 returns a channel to receive all inputs before close.
func ChanFloat32FuncErr ¶
ChanFloat32FuncErr returns a channel to receive all results of act until err != nil before close.
func ChanFloat32FuncNok ¶
ChanFloat32FuncNok returns a channel to receive all results of act until nok before close.
func ChanFloat32Slice ¶
ChanFloat32Slice returns a channel to receive all inputs before close.
func ChanFuncErr ¶
ChanFuncErr returns a channel to receive all results of act until err != nil before close.
func ChanFuncNok ¶
ChanFuncNok returns a channel to receive all results of act until nok before close.
func DaisyChain ¶
DaisyChain returns a channel to receive all inp after having passed thru all tubes.
func Done ¶
func Done(inp <-chan float64) (done <-chan struct{})
Done returns a channel to receive one signal before close after inp has been drained.
func DoneFloat32 ¶
func DoneFloat32(inp <-chan float32) (done <-chan struct{})
DoneFloat32 returns a channel to receive one signal before close after inp has been drained.
func DoneFloat32Func ¶
DoneFloat32Func returns a channel to receive one signal before close after act has been applied to all inp.
func DoneFloat32Slice ¶
DoneFloat32Slice returns a channel which will receive a slice of all the Float32s received on inp channel before close. Unlike DoneFloat32, a full slice is sent once, not just an event.
func DoneFunc ¶
DoneFunc returns a channel to receive one signal before close after act has been applied to all inp.
func DoneSlice ¶
DoneSlice returns a channel which will receive a slice of all the s received on inp channel before close. Unlike Done, a full slice is sent once, not just an event.
func Float32Daisy ¶
func Float32Daisy(inp <-chan float32, tube Float32Tube) (out <-chan float32)
Float32Daisy returns a channel to receive all inp after having passed thru tube.
func Float32DaisyChain ¶
func Float32DaisyChain(inp <-chan float32, tubes ...Float32Tube) (out <-chan float32)
Float32DaisyChain returns a channel to receive all inp after having passed thru all tubes.
func Join ¶
Join sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained
func JoinChan ¶
JoinChan sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained
func JoinFloat32 ¶
JoinFloat32 sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained
func JoinFloat32Chan ¶
JoinFloat32Chan sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained
func JoinFloat32Slice ¶
JoinFloat32Slice sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained
func JoinSlice ¶
JoinSlice sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained
func MakeChan ¶
func MakeChan() (out chan float64)
MakeChan returns a new open channel (simply a 'chan float64' that is).
Note: No '-producer' is launched here yet! (as is in all the other functions).
This is useful to easily create corresponding variables such as
var myPipelineStartsHere := MakeChan() // ... lot's of code to design and build Your favourite "myWorkflowPipeline" // ... // ... *before* You start pouring data into it, e.g. simply via: for drop := range water { myPipelineStartsHere <- drop } close(myPipelineStartsHere)
Hint: especially helpful, if Your piping library operates on some hidden (non-exported) type (or on a type imported from elsewhere - and You don't want/need or should(!) have to care.)
Note: as always (except for PipeBuffer) the channel is unbuffered.
func MakeFloat32Chan ¶
func MakeFloat32Chan() (out chan float32)
MakeFloat32Chan returns a new open channel (simply a 'chan float32' that is).
Note: No 'Float32-producer' is launched here yet! (as is in all the other functions).
This is useful to easily create corresponding variables such as
var myFloat32PipelineStartsHere := MakeFloat32Chan() // ... lot's of code to design and build Your favourite "myFloat32WorkflowPipeline" // ... // ... *before* You start pouring data into it, e.g. simply via: for drop := range water { myFloat32PipelineStartsHere <- drop } close(myFloat32PipelineStartsHere)
Hint: especially helpful, if Your piping library operates on some hidden (non-exported) type (or on a type imported from elsewhere - and You don't want/need or should(!) have to care.)
Note: as always (except for PipeFloat32Buffer) the channel is unbuffered.
func Merge ¶
Merge returns a channel to receive all inputs sorted and free of duplicates. Each input channel needs to be ascending; sorted and free of duplicates.
Note: If no inputs are given, a closed channel is returned.
func MergeFloat32 ¶
MergeFloat32 returns a channel to receive all inputs sorted and free of duplicates. Each input channel needs to be ascending; sorted and free of duplicates.
Note: If no inputs are given, a closed Float32channel is returned.
func PipeBuffer ¶
PipeBuffer returns a buffered channel with capacity cap to receive all inp before close.
func PipeFloat32Buffer ¶
PipeFloat32Buffer returns a buffered channel with capacity cap to receive all inp before close.
func PipeFloat32Fork ¶
PipeFloat32Fork returns two channels to receive every result of inp before close.
Note: Yes, it is a VERY simple fanout - but sometimes all You need.
func PipeFloat32Func ¶
PipeFloat32Func returns a channel to receive every result of act applied to inp before close. Note: it 'could' be PipeFloat32Map for functional people, but 'map' has a very different meaning in go lang.
func PipeFork ¶
PipeFork returns two channels to receive every result of inp before close.
Note: Yes, it is a VERY simple fanout - but sometimes all You need.
func PipeFunc ¶
PipeFunc returns a channel to receive every result of act applied to inp before close. Note: it 'could' be PipeMap for functional people, but 'map' has a very different meaning in go lang.
func SendProxy ¶
SendProxy returns a channel to serve as a sending proxy to 'out'. Uses a goroutine to receive values from 'out' and store them in an expanding buffer, so that sending to 'out' never blocks.
Note: the expanding buffer is implemented via "container/ring"
func SendProxyFloat32 ¶
SendProxyFloat32 returns a channel to serve as a sending proxy to 'out'. Uses a goroutine to receive values from 'out' and store them in an expanding buffer, so that sending to 'out' never blocks.
Note: the expanding buffer is implemented via "container/ring"
Types ¶
type BasicInfo ¶
type BasicInfo int
BasicInfo is a set of flags describing properties of a basic type.
type Float32Tube ¶
Float32Tube is the signature for a pipe function.