Documentation
¶
Index ¶
- Constants
- func Chan(inp ...complex128) (out <-chan complex128)
- func ChanComplex64(inp ...complex64) (out <-chan complex64)
- func ChanComplex64FuncErr(act func() (complex64, error)) (out <-chan complex64)
- func ChanComplex64FuncNok(act func() (complex64, bool)) (out <-chan complex64)
- func ChanComplex64Slice(inp ...[]complex64) (out <-chan complex64)
- func ChanFuncErr(act func() (complex128, error)) (out <-chan complex128)
- func ChanFuncNok(act func() (complex128, bool)) (out <-chan complex128)
- func ChanSlice(inp ...[]complex128) (out <-chan complex128)
- func Complex64Daisy(inp <-chan complex64, tube Complex64Tube) (out <-chan complex64)
- func Complex64DaisyChain(inp <-chan complex64, tubes ...Complex64Tube) (out <-chan complex64)
- func Daisy(inp <-chan complex128, tube Tube) (out <-chan complex128)
- func DaisyChain(inp <-chan complex128, tubes ...Tube) (out <-chan complex128)
- func Done(inp <-chan complex128) (done <-chan struct{})
- func DoneComplex64(inp <-chan complex64) (done <-chan struct{})
- func DoneComplex64Func(inp <-chan complex64, act func(a complex64)) (out <-chan struct{})
- func DoneComplex64Slice(inp <-chan complex64) (done <-chan ([]complex64))
- func DoneFunc(inp <-chan complex128, act func(a complex128)) (out <-chan struct{})
- func DoneSlice(inp <-chan complex128) (done <-chan ([]complex128))
- func Join(out chan<- complex128, inp ...complex128) (done <-chan struct{})
- func JoinChan(out chan<- complex128, inp <-chan complex128) (done <-chan struct{})
- func JoinComplex64(out chan<- complex64, inp ...complex64) (done <-chan struct{})
- func JoinComplex64Chan(out chan<- complex64, inp <-chan complex64) (done <-chan struct{})
- func JoinComplex64Slice(out chan<- complex64, inp ...[]complex64) (done <-chan struct{})
- func JoinSlice(out chan<- complex128, inp ...[]complex128) (done <-chan struct{})
- func MakeChan() (out chan complex128)
- func MakeComplex64Chan() (out chan complex64)
- func PipeBuffer(inp <-chan complex128, cap int) (out <-chan complex128)
- func PipeComplex64Buffer(inp <-chan complex64, cap int) (out <-chan complex64)
- func PipeComplex64Fork(inp <-chan complex64) (out1, out2 <-chan complex64)
- func PipeComplex64Func(inp <-chan complex64, act func(a complex64) complex64) (out <-chan complex64)
- func PipeFork(inp <-chan complex128) (out1, out2 <-chan complex128)
- func PipeFunc(inp <-chan complex128, act func(a complex128) complex128) (out <-chan complex128)
- func SendProxy(out chan<- complex128) chan<- complex128
- func SendProxyComplex64(out chan<- complex64) chan<- complex64
- type BasicInfo
- type BasicKind
- type Complex64Tube
- type Tube
Constants ¶
const CAP = 10
CAP is the capacity of the buffered proxy channel
const Complex64CAP = 10
Complex64CAP is the capacity of the buffered proxy channel
const Complex64QUE = 16
Complex64QUE 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 Chan ¶
func Chan(inp ...complex128) (out <-chan complex128)
Chan returns a channel to receive all inputs before close.
func ChanComplex64 ¶
ChanComplex64 returns a channel to receive all inputs before close.
func ChanComplex64FuncErr ¶
ChanComplex64FuncErr returns a channel to receive all results of act until err != nil before close.
func ChanComplex64FuncNok ¶
ChanComplex64FuncNok returns a channel to receive all results of act until nok before close.
func ChanComplex64Slice ¶
ChanComplex64Slice returns a channel to receive all inputs before close.
func ChanFuncErr ¶
func ChanFuncErr(act func() (complex128, error)) (out <-chan complex128)
ChanFuncErr returns a channel to receive all results of act until err != nil before close.
func ChanFuncNok ¶
func ChanFuncNok(act func() (complex128, bool)) (out <-chan complex128)
ChanFuncNok returns a channel to receive all results of act until nok before close.
func ChanSlice ¶
func ChanSlice(inp ...[]complex128) (out <-chan complex128)
ChanSlice returns a channel to receive all inputs before close.
func Complex64Daisy ¶
func Complex64Daisy(inp <-chan complex64, tube Complex64Tube) (out <-chan complex64)
Complex64Daisy returns a channel to receive all inp after having passed thru tube.
func Complex64DaisyChain ¶
func Complex64DaisyChain(inp <-chan complex64, tubes ...Complex64Tube) (out <-chan complex64)
Complex64DaisyChain returns a channel to receive all inp after having passed thru all tubes.
func Daisy ¶
func Daisy(inp <-chan complex128, tube Tube) (out <-chan complex128)
Daisy returns a channel to receive all inp after having passed thru tube.
func DaisyChain ¶
func DaisyChain(inp <-chan complex128, tubes ...Tube) (out <-chan complex128)
DaisyChain returns a channel to receive all inp after having passed thru all tubes.
func Done ¶
func Done(inp <-chan complex128) (done <-chan struct{})
Done returns a channel to receive one signal before close after inp has been drained.
func DoneComplex64 ¶
func DoneComplex64(inp <-chan complex64) (done <-chan struct{})
DoneComplex64 returns a channel to receive one signal before close after inp has been drained.
func DoneComplex64Func ¶
DoneComplex64Func returns a channel to receive one signal before close after act has been applied to all inp.
func DoneComplex64Slice ¶
DoneComplex64Slice returns a channel which will receive a slice of all the Complex64s received on inp channel before close. Unlike DoneComplex64, a full slice is sent once, not just an event.
func DoneFunc ¶
func DoneFunc(inp <-chan complex128, act func(a complex128)) (out <-chan struct{})
DoneFunc returns a channel to receive one signal before close after act has been applied to all inp.
func DoneSlice ¶
func DoneSlice(inp <-chan complex128) (done <-chan ([]complex128))
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 Join ¶
func Join(out chan<- complex128, inp ...complex128) (done <-chan struct{})
Join sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained
func JoinChan ¶
func JoinChan(out chan<- complex128, inp <-chan complex128) (done <-chan struct{})
JoinChan sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained
func JoinComplex64 ¶
JoinComplex64 sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained
func JoinComplex64Chan ¶
JoinComplex64Chan sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained
func JoinComplex64Slice ¶
JoinComplex64Slice sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained
func JoinSlice ¶
func JoinSlice(out chan<- complex128, inp ...[]complex128) (done <-chan struct{})
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 complex128)
MakeChan returns a new open channel (simply a 'chan complex128' 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 MakeComplex64Chan ¶
func MakeComplex64Chan() (out chan complex64)
MakeComplex64Chan returns a new open channel (simply a 'chan complex64' that is).
Note: No 'Complex64-producer' is launched here yet! (as is in all the other functions).
This is useful to easily create corresponding variables such as
var myComplex64PipelineStartsHere := MakeComplex64Chan() // ... lot's of code to design and build Your favourite "myComplex64WorkflowPipeline" // ... // ... *before* You start pouring data into it, e.g. simply via: for drop := range water { myComplex64PipelineStartsHere <- drop } close(myComplex64PipelineStartsHere)
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 PipeComplex64Buffer) the channel is unbuffered.
func PipeBuffer ¶
func PipeBuffer(inp <-chan complex128, cap int) (out <-chan complex128)
PipeBuffer returns a buffered channel with capacity cap to receive all inp before close.
func PipeComplex64Buffer ¶
PipeComplex64Buffer returns a buffered channel with capacity cap to receive all inp before close.
func PipeComplex64Fork ¶
PipeComplex64Fork 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 PipeComplex64Func ¶
func PipeComplex64Func(inp <-chan complex64, act func(a complex64) complex64) (out <-chan complex64)
PipeComplex64Func returns a channel to receive every result of act applied to inp before close. Note: it 'could' be PipeComplex64Map for functional people, but 'map' has a very different meaning in go lang.
func PipeFork ¶
func PipeFork(inp <-chan complex128) (out1, out2 <-chan complex128)
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 ¶
func PipeFunc(inp <-chan complex128, act func(a complex128) complex128) (out <-chan complex128)
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 ¶
func SendProxy(out chan<- complex128) chan<- complex128
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 SendProxyComplex64 ¶
SendProxyComplex64 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 Complex64Tube ¶
Complex64Tube is the signature for a pipe function.
type Tube ¶
type Tube func(inp <-chan complex128, out <-chan complex128)
Tube is the signature for a pipe function.