Documentation ¶
Index ¶
- Constants
- func BoolSDaisy(inp <-chan []bool, tube BoolSTube) (out <-chan []bool)
- func BoolSDaisyChain(inp <-chan []bool, tubes ...BoolSTube) (out <-chan []bool)
- func Chan(inp ...bool) (out <-chan bool)
- func ChanBoolS(inp ...[]bool) (out <-chan []bool)
- func ChanBoolSFuncErr(act func() ([]bool, error)) (out <-chan []bool)
- func ChanBoolSFuncNok(act func() ([]bool, bool)) (out <-chan []bool)
- func ChanBoolSSlice(inp ...[][]bool) (out <-chan []bool)
- func ChanFuncErr(act func() (bool, error)) (out <-chan bool)
- func ChanFuncNok(act func() (bool, bool)) (out <-chan bool)
- func ChanSlice(inp ...[]bool) (out <-chan bool)
- func Daisy(inp <-chan bool, tube Tube) (out <-chan bool)
- func DaisyChain(inp <-chan bool, tubes ...Tube) (out <-chan bool)
- func Done(inp <-chan bool) (done <-chan struct{})
- func DoneBoolS(inp <-chan []bool) (done <-chan struct{})
- func DoneBoolSFunc(inp <-chan []bool, act func(a []bool)) (out <-chan struct{})
- func DoneBoolSSlice(inp <-chan []bool) (done <-chan [][]bool)
- func DoneFunc(inp <-chan bool, act func(a bool)) (out <-chan struct{})
- func DoneSlice(inp <-chan bool) (done <-chan []bool)
- func Join(out chan<- bool, inp ...bool) (done <-chan struct{})
- func JoinBoolS(out chan<- []bool, inp ...[]bool) (done <-chan struct{})
- func JoinBoolSChan(out chan<- []bool, inp <-chan []bool) (done <-chan struct{})
- func JoinBoolSSlice(out chan<- []bool, inp ...[][]bool) (done <-chan struct{})
- func JoinChan(out chan<- bool, inp <-chan bool) (done <-chan struct{})
- func JoinSlice(out chan<- bool, inp ...[]bool) (done <-chan struct{})
- func MakeBoolSChan() (out chan []bool)
- func MakeChan() (out chan bool)
- func PipeBoolSBuffer(inp <-chan []bool, cap int) (out <-chan []bool)
- func PipeBoolSFork(inp <-chan []bool) (out1, out2 <-chan []bool)
- func PipeBoolSFunc(inp <-chan []bool, act func(a []bool) []bool) (out <-chan []bool)
- func PipeBuffer(inp <-chan bool, cap int) (out <-chan bool)
- func PipeFork(inp <-chan bool) (out1, out2 <-chan bool)
- func PipeFunc(inp <-chan bool, act func(a bool) bool) (out <-chan bool)
- func SendProxy(out chan<- bool) chan<- bool
- func SendProxyBoolS(out chan<- []bool) chan<- []bool
- type BasicInfo
- type BasicKind
- type BoolSTube
- type Tube
Constants ¶
const BoolSCAP = 10
BoolSCAP is the capacity of the buffered proxy channel
const BoolSQUE = 16
BoolSQUE is the allocated size of the circular queue
const CAP = 10
CAP is the capacity of the buffered proxy channel
const QUE = 16
QUE is the allocated size of the circular queue
Variables ¶
This section is empty.
Functions ¶
func BoolSDaisy ¶
BoolSDaisy returns a channel to receive all inp after having passed thru tube.
func BoolSDaisyChain ¶
BoolSDaisyChain returns a channel to receive all inp after having passed thru all tubes.
func ChanBoolSFuncErr ¶
ChanBoolSFuncErr returns a channel to receive all results of act until err != nil before close.
func ChanBoolSFuncNok ¶
ChanBoolSFuncNok returns a channel to receive all results of act until nok before close.
func ChanBoolSSlice ¶
ChanBoolSSlice 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 bool) (done <-chan struct{})
Done returns a channel to receive one signal before close after inp has been drained.
func DoneBoolS ¶
func DoneBoolS(inp <-chan []bool) (done <-chan struct{})
DoneBoolS returns a channel to receive one signal before close after inp has been drained.
func DoneBoolSFunc ¶
DoneBoolSFunc returns a channel to receive one signal before close after act has been applied to all inp.
func DoneBoolSSlice ¶
DoneBoolSSlice returns a channel which will receive a slice of all the BoolSs received on inp channel before close. Unlike DoneBoolS, 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 Join ¶
Join sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained
func JoinBoolS ¶
JoinBoolS sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained
func JoinBoolSChan ¶
JoinBoolSChan sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained
func JoinBoolSSlice ¶
JoinBoolSSlice 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 JoinSlice ¶
JoinSlice sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained
func MakeBoolSChan ¶
func MakeBoolSChan() (out chan []bool)
MakeBoolSChan returns a new open channel (simply a 'chan []bool' that is).
Note: No 'BoolS-producer' is launched here yet! (as is in all the other functions).
This is useful to easily create corresponding variables such as
var myBoolSPipelineStartsHere := MakeBoolSChan() // ... lot's of code to design and build Your favourite "myBoolSWorkflowPipeline" // ... // ... *before* You start pouring data into it, e.g. simply via: for drop := range water { myBoolSPipelineStartsHere <- drop } close(myBoolSPipelineStartsHere)
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 PipeBoolSBuffer) the channel is unbuffered.
func MakeChan ¶
func MakeChan() (out chan bool)
MakeChan returns a new open channel (simply a 'chan bool' 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 PipeBoolSBuffer ¶
PipeBoolSBuffer returns a buffered channel with capacity cap to receive all inp before close.
func PipeBoolSFork ¶
PipeBoolSFork 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 PipeBoolSFunc ¶
PipeBoolSFunc returns a channel to receive every result of act applied to inp before close. Note: it 'could' be PipeBoolSMap for functional people, but 'map' has a very different meaning in go lang.
func PipeBuffer ¶
PipeBuffer returns a buffered channel with capacity cap to receive all inp before close.
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 SendProxyBoolS ¶
SendProxyBoolS 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.