Documentation ¶
Index ¶
- Constants
- func ChanDotPath(inp ...*dotpath.DotPath) (out <-chan *dotpath.DotPath)
- func ChanDotPathFuncErr(act func() (*dotpath.DotPath, error)) (out <-chan *dotpath.DotPath)
- func ChanDotPathFuncNil(act func() *dotpath.DotPath) (out <-chan *dotpath.DotPath)
- func ChanDotPathFuncNok(act func() (*dotpath.DotPath, bool)) (out <-chan *dotpath.DotPath)
- func ChanDotPathSlice(inp ...[]*dotpath.DotPath) (out <-chan *dotpath.DotPath)
- func DoneDotPath(inp <-chan *dotpath.DotPath) (done <-chan struct{})
- func DoneDotPathFunc(inp <-chan *dotpath.DotPath, act func(a *dotpath.DotPath)) (out <-chan struct{})
- func DoneDotPathSlice(inp <-chan *dotpath.DotPath) (done <-chan []*dotpath.DotPath)
- func DotPathDaisy(inp <-chan *dotpath.DotPath, tube DotPathTube) (out <-chan *dotpath.DotPath)
- func DotPathDaisyChain(inp <-chan *dotpath.DotPath, tubes ...DotPathTube) (out <-chan *dotpath.DotPath)
- func JoinDotPath(out chan<- *dotpath.DotPath, inp ...*dotpath.DotPath) (done <-chan struct{})
- func JoinDotPathChan(out chan<- *dotpath.DotPath, inp <-chan *dotpath.DotPath) (done <-chan struct{})
- func JoinDotPathSlice(out chan<- *dotpath.DotPath, inp ...[]*dotpath.DotPath) (done <-chan struct{})
- func MakeDotPathChan() (out chan *dotpath.DotPath)
- func PipeDotPathBuffer(inp <-chan *dotpath.DotPath, cap int) (out <-chan *dotpath.DotPath)
- func PipeDotPathFork(inp <-chan *dotpath.DotPath) (out1, out2 <-chan *dotpath.DotPath)
- func PipeDotPathFunc(inp <-chan *dotpath.DotPath, act func(a *dotpath.DotPath) *dotpath.DotPath) (out <-chan *dotpath.DotPath)
- func SendProxyDotPath(out chan<- *dotpath.DotPath) chan<- *dotpath.DotPath
- type DotPathTube
Constants ¶
const DotPathCAP = 10
DotPathCAP is the capacity of the buffered proxy channel
const DotPathQUE = 16
DotPathQUE is the allocated size of the circular queue
Variables ¶
This section is empty.
Functions ¶
func ChanDotPath ¶
ChanDotPath returns a channel to receive all inputs before close.
func ChanDotPathFuncErr ¶
ChanDotPathFuncErr returns a channel to receive all results of act until err != nil before close.
func ChanDotPathFuncNil ¶
ChanDotPathFuncNil returns a channel to receive all results of act until nil before close.
func ChanDotPathFuncNok ¶
ChanDotPathFuncNok returns a channel to receive all results of act until nok before close.
func ChanDotPathSlice ¶
ChanDotPathSlice returns a channel to receive all inputs before close.
func DoneDotPath ¶
DoneDotPath returns a channel to receive one signal before close after inp has been drained.
func DoneDotPathFunc ¶
func DoneDotPathFunc(inp <-chan *dotpath.DotPath, act func(a *dotpath.DotPath)) (out <-chan struct{})
DoneDotPathFunc returns a channel to receive one signal before close after act has been applied to all inp.
func DoneDotPathSlice ¶
DoneDotPathSlice returns a channel which will receive a slice of all the DotPaths received on inp channel before close. Unlike DoneDotPath, a full slice is sent once, not just an event.
func DotPathDaisy ¶
func DotPathDaisy(inp <-chan *dotpath.DotPath, tube DotPathTube) (out <-chan *dotpath.DotPath)
DotPathDaisy returns a channel to receive all inp after having passed thru tube.
func DotPathDaisyChain ¶
func DotPathDaisyChain(inp <-chan *dotpath.DotPath, tubes ...DotPathTube) (out <-chan *dotpath.DotPath)
DotPathDaisyChain returns a channel to receive all inp after having passed thru all tubes.
func JoinDotPath ¶
JoinDotPath sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained
func JoinDotPathChan ¶
func JoinDotPathChan(out chan<- *dotpath.DotPath, inp <-chan *dotpath.DotPath) (done <-chan struct{})
JoinDotPathChan sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained
func JoinDotPathSlice ¶
func JoinDotPathSlice(out chan<- *dotpath.DotPath, inp ...[]*dotpath.DotPath) (done <-chan struct{})
JoinDotPathSlice sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained
func MakeDotPathChan ¶
MakeDotPathChan returns a new open channel (simply a 'chan *dotpath.DotPath' that is).
Note: No 'DotPath-producer' is launched here yet! (as is in all the other functions).
This is useful to easily create corresponding variables such as
var myDotPathPipelineStartsHere := MakeDotPathChan() // ... lot's of code to design and build Your favourite "myDotPathWorkflowPipeline" // ... // ... *before* You start pouring data into it, e.g. simply via: for drop := range water { myDotPathPipelineStartsHere <- drop } close(myDotPathPipelineStartsHere)
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 PipeDotPathBuffer) the channel is unbuffered.
func PipeDotPathBuffer ¶
PipeDotPathBuffer returns a buffered channel with capacity cap to receive all inp before close.
func PipeDotPathFork ¶
PipeDotPathFork 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 PipeDotPathFunc ¶
func PipeDotPathFunc(inp <-chan *dotpath.DotPath, act func(a *dotpath.DotPath) *dotpath.DotPath) (out <-chan *dotpath.DotPath)
PipeDotPathFunc returns a channel to receive every result of act applied to inp before close. Note: it 'could' be PipeDotPathMap for functional people, but 'map' has a very different meaning in go lang.
func SendProxyDotPath ¶
SendProxyDotPath 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"