Documentation ¶
Index ¶
- Constants
- func Chan(inp ...*list.List) (out <-chan *list.List)
- func ChanElement(inp ...*list.Element) (out <-chan *list.Element)
- func ChanElementFuncErr(act func() (*list.Element, error)) (out <-chan *list.Element)
- func ChanElementFuncNil(act func() *list.Element) (out <-chan *list.Element)
- func ChanElementFuncNok(act func() (*list.Element, bool)) (out <-chan *list.Element)
- func ChanElementS(inp ...[]*list.Element) (out <-chan []*list.Element)
- func ChanElementSFuncErr(act func() ([]*list.Element, error)) (out <-chan []*list.Element)
- func ChanElementSFuncNil(act func() []*list.Element) (out <-chan []*list.Element)
- func ChanElementSFuncNok(act func() ([]*list.Element, bool)) (out <-chan []*list.Element)
- func ChanElementSSlice(inp ...[][]*list.Element) (out <-chan []*list.Element)
- func ChanElementSlice(inp ...[]*list.Element) (out <-chan *list.Element)
- func ChanFuncErr(act func() (*list.List, error)) (out <-chan *list.List)
- func ChanFuncNil(act func() *list.List) (out <-chan *list.List)
- func ChanFuncNok(act func() (*list.List, bool)) (out <-chan *list.List)
- func ChanListS(inp ...[]*list.List) (out <-chan []*list.List)
- func ChanListSFuncErr(act func() ([]*list.List, error)) (out <-chan []*list.List)
- func ChanListSFuncNil(act func() []*list.List) (out <-chan []*list.List)
- func ChanListSFuncNok(act func() ([]*list.List, bool)) (out <-chan []*list.List)
- func ChanListSSlice(inp ...[][]*list.List) (out <-chan []*list.List)
- func ChanSlice(inp ...[]*list.List) (out <-chan *list.List)
- func Daisy(inp <-chan *list.List, tube Tube) (out <-chan *list.List)
- func DaisyChain(inp <-chan *list.List, tubes ...Tube) (out <-chan *list.List)
- func Done(inp <-chan *list.List) (done <-chan struct{})
- func DoneElement(inp <-chan *list.Element) (done <-chan struct{})
- func DoneElementFunc(inp <-chan *list.Element, act func(a *list.Element)) (out <-chan struct{})
- func DoneElementS(inp <-chan []*list.Element) (done <-chan struct{})
- func DoneElementSFunc(inp <-chan []*list.Element, act func(a []*list.Element)) (out <-chan struct{})
- func DoneElementSSlice(inp <-chan []*list.Element) (done <-chan ([][]*list.Element))
- func DoneElementSlice(inp <-chan *list.Element) (done <-chan ([]*list.Element))
- func DoneFunc(inp <-chan *list.List, act func(a *list.List)) (out <-chan struct{})
- func DoneListS(inp <-chan []*list.List) (done <-chan struct{})
- func DoneListSFunc(inp <-chan []*list.List, act func(a []*list.List)) (out <-chan struct{})
- func DoneListSSlice(inp <-chan []*list.List) (done <-chan ([][]*list.List))
- func DoneSlice(inp <-chan *list.List) (done <-chan ([]*list.List))
- func ElementDaisy(inp <-chan *list.Element, tube ElementTube) (out <-chan *list.Element)
- func ElementDaisyChain(inp <-chan *list.Element, tubes ...ElementTube) (out <-chan *list.Element)
- func ElementSDaisy(inp <-chan []*list.Element, tube ElementSTube) (out <-chan []*list.Element)
- func ElementSDaisyChain(inp <-chan []*list.Element, tubes ...ElementSTube) (out <-chan []*list.Element)
- func Join(out chan<- *list.List, inp ...*list.List) (done <-chan struct{})
- func JoinChan(out chan<- *list.List, inp <-chan *list.List) (done <-chan struct{})
- func JoinElement(out chan<- *list.Element, inp ...*list.Element) (done <-chan struct{})
- func JoinElementChan(out chan<- *list.Element, inp <-chan *list.Element) (done <-chan struct{})
- func JoinElementS(out chan<- []*list.Element, inp ...[]*list.Element) (done <-chan struct{})
- func JoinElementSChan(out chan<- []*list.Element, inp <-chan []*list.Element) (done <-chan struct{})
- func JoinElementSSlice(out chan<- []*list.Element, inp ...[][]*list.Element) (done <-chan struct{})
- func JoinElementSlice(out chan<- *list.Element, inp ...[]*list.Element) (done <-chan struct{})
- func JoinListS(out chan<- []*list.List, inp ...[]*list.List) (done <-chan struct{})
- func JoinListSChan(out chan<- []*list.List, inp <-chan []*list.List) (done <-chan struct{})
- func JoinListSSlice(out chan<- []*list.List, inp ...[][]*list.List) (done <-chan struct{})
- func JoinSlice(out chan<- *list.List, inp ...[]*list.List) (done <-chan struct{})
- func ListSDaisy(inp <-chan []*list.List, tube ListSTube) (out <-chan []*list.List)
- func ListSDaisyChain(inp <-chan []*list.List, tubes ...ListSTube) (out <-chan []*list.List)
- func MakeChan() (out chan *list.List)
- func MakeElementChan() (out chan *list.Element)
- func MakeElementSChan() (out chan []*list.Element)
- func MakeListSChan() (out chan []*list.List)
- func PipeBuffer(inp <-chan *list.List, cap int) (out <-chan *list.List)
- func PipeElementBuffer(inp <-chan *list.Element, cap int) (out <-chan *list.Element)
- func PipeElementFork(inp <-chan *list.Element) (out1, out2 <-chan *list.Element)
- func PipeElementFunc(inp <-chan *list.Element, act func(a *list.Element) *list.Element) (out <-chan *list.Element)
- func PipeElementSBuffer(inp <-chan []*list.Element, cap int) (out <-chan []*list.Element)
- func PipeElementSFork(inp <-chan []*list.Element) (out1, out2 <-chan []*list.Element)
- func PipeElementSFunc(inp <-chan []*list.Element, act func(a []*list.Element) []*list.Element) (out <-chan []*list.Element)
- func PipeFork(inp <-chan *list.List) (out1, out2 <-chan *list.List)
- func PipeFunc(inp <-chan *list.List, act func(a *list.List) *list.List) (out <-chan *list.List)
- func PipeListSBuffer(inp <-chan []*list.List, cap int) (out <-chan []*list.List)
- func PipeListSFork(inp <-chan []*list.List) (out1, out2 <-chan []*list.List)
- func PipeListSFunc(inp <-chan []*list.List, act func(a []*list.List) []*list.List) (out <-chan []*list.List)
- func SendProxy(out chan<- *list.List) chan<- *list.List
- func SendProxyElement(out chan<- *list.Element) chan<- *list.Element
- func SendProxyElementS(out chan<- []*list.Element) chan<- []*list.Element
- func SendProxyListS(out chan<- []*list.List) chan<- []*list.List
- type ElementSTube
- type ElementTube
- type ListSTube
- type Tube
Constants ¶
const CAP = 10
CAP is the capacity of the buffered proxy channel
const ElementCAP = 10
ElementCAP is the capacity of the buffered proxy channel
const ElementQUE = 16
ElementQUE is the allocated size of the circular queue
const ElementSCAP = 10
ElementSCAP is the capacity of the buffered proxy channel
const ElementSQUE = 16
ElementSQUE is the allocated size of the circular queue
const ListSCAP = 10
ListSCAP is the capacity of the buffered proxy channel
const ListSQUE = 16
ListSQUE 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 ChanElement ¶
ChanElement returns a channel to receive all inputs before close.
func ChanElementFuncErr ¶
ChanElementFuncErr returns a channel to receive all results of act until err != nil before close.
func ChanElementFuncNil ¶
ChanElementFuncNil returns a channel to receive all results of act until nil before close.
func ChanElementFuncNok ¶
ChanElementFuncNok returns a channel to receive all results of act until nok before close.
func ChanElementS ¶
ChanElementS returns a channel to receive all inputs before close.
func ChanElementSFuncErr ¶
ChanElementSFuncErr returns a channel to receive all results of act until err != nil before close.
func ChanElementSFuncNil ¶
ChanElementSFuncNil returns a channel to receive all results of act until nil before close.
func ChanElementSFuncNok ¶
ChanElementSFuncNok returns a channel to receive all results of act until nok before close.
func ChanElementSSlice ¶
ChanElementSSlice returns a channel to receive all inputs before close.
func ChanElementSlice ¶
ChanElementSlice 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 ChanFuncNil ¶
ChanFuncNil returns a channel to receive all results of act until nil before close.
func ChanFuncNok ¶
ChanFuncNok returns a channel to receive all results of act until nok before close.
func ChanListSFuncErr ¶
ChanListSFuncErr returns a channel to receive all results of act until err != nil before close.
func ChanListSFuncNil ¶
ChanListSFuncNil returns a channel to receive all results of act until nil before close.
func ChanListSFuncNok ¶
ChanListSFuncNok returns a channel to receive all results of act until nok before close.
func ChanListSSlice ¶
ChanListSSlice returns a channel to receive all inputs before close.
func DaisyChain ¶
DaisyChain returns a channel to receive all inp after having passed thru all tubes.
func DoneElement ¶
DoneElement returns a channel to receive one signal before close after inp has been drained.
func DoneElementFunc ¶
DoneElementFunc returns a channel to receive one signal before close after act has been applied to all inp.
func DoneElementS ¶
DoneElementS returns a channel to receive one signal before close after inp has been drained.
func DoneElementSFunc ¶
func DoneElementSFunc(inp <-chan []*list.Element, act func(a []*list.Element)) (out <-chan struct{})
DoneElementSFunc returns a channel to receive one signal before close after act has been applied to all inp.
func DoneElementSSlice ¶
DoneElementSSlice returns a channel which will receive a slice of all the ElementSs received on inp channel before close. Unlike DoneElementS, a full slice is sent once, not just an event.
func DoneElementSlice ¶
DoneElementSlice returns a channel which will receive a slice of all the Elements received on inp channel before close. Unlike DoneElement, 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 DoneListS ¶
DoneListS returns a channel to receive one signal before close after inp has been drained.
func DoneListSFunc ¶
DoneListSFunc returns a channel to receive one signal before close after act has been applied to all inp.
func DoneListSSlice ¶
DoneListSSlice returns a channel which will receive a slice of all the ListSs received on inp channel before close. Unlike DoneListS, a full slice is sent once, not just an event.
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 ElementDaisy ¶
func ElementDaisy(inp <-chan *list.Element, tube ElementTube) (out <-chan *list.Element)
ElementDaisy returns a channel to receive all inp after having passed thru tube.
func ElementDaisyChain ¶
func ElementDaisyChain(inp <-chan *list.Element, tubes ...ElementTube) (out <-chan *list.Element)
ElementDaisyChain returns a channel to receive all inp after having passed thru all tubes.
func ElementSDaisy ¶
func ElementSDaisy(inp <-chan []*list.Element, tube ElementSTube) (out <-chan []*list.Element)
ElementSDaisy returns a channel to receive all inp after having passed thru tube.
func ElementSDaisyChain ¶
func ElementSDaisyChain(inp <-chan []*list.Element, tubes ...ElementSTube) (out <-chan []*list.Element)
ElementSDaisyChain 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 JoinElement ¶
JoinElement sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained
func JoinElementChan ¶
JoinElementChan sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained
func JoinElementS ¶
JoinElementS sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained
func JoinElementSChan ¶
func JoinElementSChan(out chan<- []*list.Element, inp <-chan []*list.Element) (done <-chan struct{})
JoinElementSChan sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained
func JoinElementSSlice ¶
JoinElementSSlice sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained
func JoinElementSlice ¶
JoinElementSlice sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained
func JoinListS ¶
JoinListS sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained
func JoinListSChan ¶
JoinListSChan sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained
func JoinListSSlice ¶
JoinListSSlice 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 ListSDaisy ¶
ListSDaisy returns a channel to receive all inp after having passed thru tube.
func ListSDaisyChain ¶
ListSDaisyChain returns a channel to receive all inp after having passed thru all tubes.
func MakeChan ¶
MakeChan returns a new open channel (simply a 'chan *list.List' 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 MakeElementChan ¶
MakeElementChan returns a new open channel (simply a 'chan *list.Element' that is).
Note: No 'Element-producer' is launched here yet! (as is in all the other functions).
This is useful to easily create corresponding variables such as
var myElementPipelineStartsHere := MakeElementChan() // ... lot's of code to design and build Your favourite "myElementWorkflowPipeline" // ... // ... *before* You start pouring data into it, e.g. simply via: for drop := range water { myElementPipelineStartsHere <- drop } close(myElementPipelineStartsHere)
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 PipeElementBuffer) the channel is unbuffered.
func MakeElementSChan ¶
MakeElementSChan returns a new open channel (simply a 'chan []*list.Element' that is).
Note: No 'ElementS-producer' is launched here yet! (as is in all the other functions).
This is useful to easily create corresponding variables such as
var myElementSPipelineStartsHere := MakeElementSChan() // ... lot's of code to design and build Your favourite "myElementSWorkflowPipeline" // ... // ... *before* You start pouring data into it, e.g. simply via: for drop := range water { myElementSPipelineStartsHere <- drop } close(myElementSPipelineStartsHere)
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 PipeElementSBuffer) the channel is unbuffered.
func MakeListSChan ¶
MakeListSChan returns a new open channel (simply a 'chan []*list.List' that is).
Note: No 'ListS-producer' is launched here yet! (as is in all the other functions).
This is useful to easily create corresponding variables such as
var myListSPipelineStartsHere := MakeListSChan() // ... lot's of code to design and build Your favourite "myListSWorkflowPipeline" // ... // ... *before* You start pouring data into it, e.g. simply via: for drop := range water { myListSPipelineStartsHere <- drop } close(myListSPipelineStartsHere)
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 PipeListSBuffer) the channel is unbuffered.
func PipeBuffer ¶
PipeBuffer returns a buffered channel with capacity cap to receive all inp before close.
func PipeElementBuffer ¶
PipeElementBuffer returns a buffered channel with capacity cap to receive all inp before close.
func PipeElementFork ¶
PipeElementFork 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 PipeElementFunc ¶
func PipeElementFunc(inp <-chan *list.Element, act func(a *list.Element) *list.Element) (out <-chan *list.Element)
PipeElementFunc returns a channel to receive every result of act applied to inp before close. Note: it 'could' be PipeElementMap for functional people, but 'map' has a very different meaning in go lang.
func PipeElementSBuffer ¶
PipeElementSBuffer returns a buffered channel with capacity cap to receive all inp before close.
func PipeElementSFork ¶
PipeElementSFork 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 PipeElementSFunc ¶
func PipeElementSFunc(inp <-chan []*list.Element, act func(a []*list.Element) []*list.Element) (out <-chan []*list.Element)
PipeElementSFunc returns a channel to receive every result of act applied to inp before close. Note: it 'could' be PipeElementSMap 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 PipeListSBuffer ¶
PipeListSBuffer returns a buffered channel with capacity cap to receive all inp before close.
func PipeListSFork ¶
PipeListSFork 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 PipeListSFunc ¶
func PipeListSFunc(inp <-chan []*list.List, act func(a []*list.List) []*list.List) (out <-chan []*list.List)
PipeListSFunc returns a channel to receive every result of act applied to inp before close. Note: it 'could' be PipeListSMap 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 SendProxyElement ¶
SendProxyElement 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 SendProxyElementS ¶
SendProxyElementS 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 SendProxyListS ¶
SendProxyListS 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 ElementSTube ¶
ElementSTube is the signature for a pipe function.
type ElementTube ¶
ElementTube is the signature for a pipe function.