Documentation ¶
Index ¶
- Constants
- func Chan(inp ...rune) (out <-chan rune)
- func ChanFuncErr(act func() (rune, error)) (out <-chan rune)
- func ChanFuncNok(act func() (rune, bool)) (out <-chan rune)
- func ChanRuneReader(inp ...io.RuneReader) (out <-chan io.RuneReader)
- func ChanRuneReaderFuncErr(act func() (io.RuneReader, error)) (out <-chan io.RuneReader)
- func ChanRuneReaderFuncNok(act func() (io.RuneReader, bool)) (out <-chan io.RuneReader)
- func ChanRuneReaderSlice(inp ...[]io.RuneReader) (out <-chan io.RuneReader)
- func ChanRuneS(inp ...[]rune) (out <-chan []rune)
- func ChanRuneSFuncErr(act func() ([]rune, error)) (out <-chan []rune)
- func ChanRuneSFuncNok(act func() ([]rune, bool)) (out <-chan []rune)
- func ChanRuneSSlice(inp ...[][]rune) (out <-chan []rune)
- func ChanRuneScanner(inp ...io.RuneScanner) (out <-chan io.RuneScanner)
- func ChanRuneScannerFuncErr(act func() (io.RuneScanner, error)) (out <-chan io.RuneScanner)
- func ChanRuneScannerFuncNok(act func() (io.RuneScanner, bool)) (out <-chan io.RuneScanner)
- func ChanRuneScannerSlice(inp ...[]io.RuneScanner) (out <-chan io.RuneScanner)
- func ChanSlice(inp ...[]rune) (out <-chan rune)
- func Daisy(inp <-chan rune, tube Tube) (out <-chan rune)
- func DaisyChain(inp <-chan rune, tubes ...Tube) (out <-chan rune)
- func Done(inp <-chan rune) (done <-chan struct{})
- func DoneFunc(inp <-chan rune, act func(a rune)) (out <-chan struct{})
- func DoneRuneReader(inp <-chan io.RuneReader) (done <-chan struct{})
- func DoneRuneReaderFunc(inp <-chan io.RuneReader, act func(a io.RuneReader)) (out <-chan struct{})
- func DoneRuneReaderSlice(inp <-chan io.RuneReader) (done <-chan ([]io.RuneReader))
- func DoneRuneS(inp <-chan []rune) (done <-chan struct{})
- func DoneRuneSFunc(inp <-chan []rune, act func(a []rune)) (out <-chan struct{})
- func DoneRuneSSlice(inp <-chan []rune) (done <-chan ([][]rune))
- func DoneRuneScanner(inp <-chan io.RuneScanner) (done <-chan struct{})
- func DoneRuneScannerFunc(inp <-chan io.RuneScanner, act func(a io.RuneScanner)) (out <-chan struct{})
- func DoneRuneScannerSlice(inp <-chan io.RuneScanner) (done <-chan ([]io.RuneScanner))
- func DoneSlice(inp <-chan rune) (done <-chan ([]rune))
- func Join(out chan<- rune, inp ...rune) (done <-chan struct{})
- func JoinChan(out chan<- rune, inp <-chan rune) (done <-chan struct{})
- func JoinRuneReader(out chan<- io.RuneReader, inp ...io.RuneReader) (done <-chan struct{})
- func JoinRuneReaderChan(out chan<- io.RuneReader, inp <-chan io.RuneReader) (done <-chan struct{})
- func JoinRuneReaderSlice(out chan<- io.RuneReader, inp ...[]io.RuneReader) (done <-chan struct{})
- func JoinRuneS(out chan<- []rune, inp ...[]rune) (done <-chan struct{})
- func JoinRuneSChan(out chan<- []rune, inp <-chan []rune) (done <-chan struct{})
- func JoinRuneSSlice(out chan<- []rune, inp ...[][]rune) (done <-chan struct{})
- func JoinRuneScanner(out chan<- io.RuneScanner, inp ...io.RuneScanner) (done <-chan struct{})
- func JoinRuneScannerChan(out chan<- io.RuneScanner, inp <-chan io.RuneScanner) (done <-chan struct{})
- func JoinRuneScannerSlice(out chan<- io.RuneScanner, inp ...[]io.RuneScanner) (done <-chan struct{})
- func JoinSlice(out chan<- rune, inp ...[]rune) (done <-chan struct{})
- func MakeChan() (out chan rune)
- func MakeRuneReaderChan() (out chan io.RuneReader)
- func MakeRuneSChan() (out chan []rune)
- func MakeRuneScannerChan() (out chan io.RuneScanner)
- func PipeBuffer(inp <-chan rune, cap int) (out <-chan rune)
- func PipeFork(inp <-chan rune) (out1, out2 <-chan rune)
- func PipeFunc(inp <-chan rune, act func(a rune) rune) (out <-chan rune)
- func PipeRuneReaderBuffer(inp <-chan io.RuneReader, cap int) (out <-chan io.RuneReader)
- func PipeRuneReaderFork(inp <-chan io.RuneReader) (out1, out2 <-chan io.RuneReader)
- func PipeRuneReaderFunc(inp <-chan io.RuneReader, act func(a io.RuneReader) io.RuneReader) (out <-chan io.RuneReader)
- func PipeRuneSBuffer(inp <-chan []rune, cap int) (out <-chan []rune)
- func PipeRuneSFork(inp <-chan []rune) (out1, out2 <-chan []rune)
- func PipeRuneSFunc(inp <-chan []rune, act func(a []rune) []rune) (out <-chan []rune)
- func PipeRuneScannerBuffer(inp <-chan io.RuneScanner, cap int) (out <-chan io.RuneScanner)
- func PipeRuneScannerFork(inp <-chan io.RuneScanner) (out1, out2 <-chan io.RuneScanner)
- func PipeRuneScannerFunc(inp <-chan io.RuneScanner, act func(a io.RuneScanner) io.RuneScanner) (out <-chan io.RuneScanner)
- func RuneReaderDaisy(inp <-chan io.RuneReader, tube RuneReaderTube) (out <-chan io.RuneReader)
- func RuneReaderDaisyChain(inp <-chan io.RuneReader, tubes ...RuneReaderTube) (out <-chan io.RuneReader)
- func RuneSDaisy(inp <-chan []rune, tube RuneSTube) (out <-chan []rune)
- func RuneSDaisyChain(inp <-chan []rune, tubes ...RuneSTube) (out <-chan []rune)
- func RuneScannerDaisy(inp <-chan io.RuneScanner, tube RuneScannerTube) (out <-chan io.RuneScanner)
- func RuneScannerDaisyChain(inp <-chan io.RuneScanner, tubes ...RuneScannerTube) (out <-chan io.RuneScanner)
- func SendProxy(out chan<- rune) chan<- rune
- func SendProxyRuneReader(out chan<- io.RuneReader) chan<- io.RuneReader
- func SendProxyRuneS(out chan<- []rune) chan<- []rune
- func SendProxyRuneScanner(out chan<- io.RuneScanner) chan<- io.RuneScanner
- type RuneReaderTube
- type RuneSTube
- type RuneScannerTube
- type Tube
Constants ¶
const CAP = 10
CAP is the capacity of the buffered proxy channel
const QUE = 16
QUE is the allocated size of the circular queue
const RuneReaderCAP = 10
RuneReaderCAP is the capacity of the buffered proxy channel
const RuneReaderQUE = 16
RuneReaderQUE is the allocated size of the circular queue
const RuneSCAP = 10
RuneSCAP is the capacity of the buffered proxy channel
const RuneSQUE = 16
RuneSQUE is the allocated size of the circular queue
const RuneScannerCAP = 10
RuneScannerCAP is the capacity of the buffered proxy channel
const RuneScannerQUE = 16
RuneScannerQUE is the allocated size of the circular queue
Variables ¶
This section is empty.
Functions ¶
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 ChanRuneReader ¶
func ChanRuneReader(inp ...io.RuneReader) (out <-chan io.RuneReader)
ChanRuneReader returns a channel to receive all inputs before close.
func ChanRuneReaderFuncErr ¶
func ChanRuneReaderFuncErr(act func() (io.RuneReader, error)) (out <-chan io.RuneReader)
ChanRuneReaderFuncErr returns a channel to receive all results of act until err != nil before close.
func ChanRuneReaderFuncNok ¶
func ChanRuneReaderFuncNok(act func() (io.RuneReader, bool)) (out <-chan io.RuneReader)
ChanRuneReaderFuncNok returns a channel to receive all results of act until nok before close.
func ChanRuneReaderSlice ¶
func ChanRuneReaderSlice(inp ...[]io.RuneReader) (out <-chan io.RuneReader)
ChanRuneReaderSlice returns a channel to receive all inputs before close.
func ChanRuneSFuncErr ¶
ChanRuneSFuncErr returns a channel to receive all results of act until err != nil before close.
func ChanRuneSFuncNok ¶
ChanRuneSFuncNok returns a channel to receive all results of act until nok before close.
func ChanRuneSSlice ¶
ChanRuneSSlice returns a channel to receive all inputs before close.
func ChanRuneScanner ¶
func ChanRuneScanner(inp ...io.RuneScanner) (out <-chan io.RuneScanner)
ChanRuneScanner returns a channel to receive all inputs before close.
func ChanRuneScannerFuncErr ¶
func ChanRuneScannerFuncErr(act func() (io.RuneScanner, error)) (out <-chan io.RuneScanner)
ChanRuneScannerFuncErr returns a channel to receive all results of act until err != nil before close.
func ChanRuneScannerFuncNok ¶
func ChanRuneScannerFuncNok(act func() (io.RuneScanner, bool)) (out <-chan io.RuneScanner)
ChanRuneScannerFuncNok returns a channel to receive all results of act until nok before close.
func ChanRuneScannerSlice ¶
func ChanRuneScannerSlice(inp ...[]io.RuneScanner) (out <-chan io.RuneScanner)
ChanRuneScannerSlice 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 Done ¶
func Done(inp <-chan rune) (done <-chan struct{})
Done returns a channel to receive one signal before close after inp has been drained.
func DoneFunc ¶
DoneFunc returns a channel to receive one signal before close after act has been applied to all inp.
func DoneRuneReader ¶
func DoneRuneReader(inp <-chan io.RuneReader) (done <-chan struct{})
DoneRuneReader returns a channel to receive one signal before close after inp has been drained.
func DoneRuneReaderFunc ¶
func DoneRuneReaderFunc(inp <-chan io.RuneReader, act func(a io.RuneReader)) (out <-chan struct{})
DoneRuneReaderFunc returns a channel to receive one signal before close after act has been applied to all inp.
func DoneRuneReaderSlice ¶
func DoneRuneReaderSlice(inp <-chan io.RuneReader) (done <-chan ([]io.RuneReader))
DoneRuneReaderSlice returns a channel which will receive a slice of all the RuneReaders received on inp channel before close. Unlike DoneRuneReader, a full slice is sent once, not just an event.
func DoneRuneS ¶
func DoneRuneS(inp <-chan []rune) (done <-chan struct{})
DoneRuneS returns a channel to receive one signal before close after inp has been drained.
func DoneRuneSFunc ¶
DoneRuneSFunc returns a channel to receive one signal before close after act has been applied to all inp.
func DoneRuneSSlice ¶
DoneRuneSSlice returns a channel which will receive a slice of all the RuneSs received on inp channel before close. Unlike DoneRuneS, a full slice is sent once, not just an event.
func DoneRuneScanner ¶
func DoneRuneScanner(inp <-chan io.RuneScanner) (done <-chan struct{})
DoneRuneScanner returns a channel to receive one signal before close after inp has been drained.
func DoneRuneScannerFunc ¶
func DoneRuneScannerFunc(inp <-chan io.RuneScanner, act func(a io.RuneScanner)) (out <-chan struct{})
DoneRuneScannerFunc returns a channel to receive one signal before close after act has been applied to all inp.
func DoneRuneScannerSlice ¶
func DoneRuneScannerSlice(inp <-chan io.RuneScanner) (done <-chan ([]io.RuneScanner))
DoneRuneScannerSlice returns a channel which will receive a slice of all the RuneScanners received on inp channel before close. Unlike DoneRuneScanner, 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 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 JoinRuneReader ¶
func JoinRuneReader(out chan<- io.RuneReader, inp ...io.RuneReader) (done <-chan struct{})
JoinRuneReader sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained
func JoinRuneReaderChan ¶
func JoinRuneReaderChan(out chan<- io.RuneReader, inp <-chan io.RuneReader) (done <-chan struct{})
JoinRuneReaderChan sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained
func JoinRuneReaderSlice ¶
func JoinRuneReaderSlice(out chan<- io.RuneReader, inp ...[]io.RuneReader) (done <-chan struct{})
JoinRuneReaderSlice sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained
func JoinRuneS ¶
JoinRuneS sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained
func JoinRuneSChan ¶
JoinRuneSChan sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained
func JoinRuneSSlice ¶
JoinRuneSSlice sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained
func JoinRuneScanner ¶
func JoinRuneScanner(out chan<- io.RuneScanner, inp ...io.RuneScanner) (done <-chan struct{})
JoinRuneScanner sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained
func JoinRuneScannerChan ¶
func JoinRuneScannerChan(out chan<- io.RuneScanner, inp <-chan io.RuneScanner) (done <-chan struct{})
JoinRuneScannerChan sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained
func JoinRuneScannerSlice ¶
func JoinRuneScannerSlice(out chan<- io.RuneScanner, inp ...[]io.RuneScanner) (done <-chan struct{})
JoinRuneScannerSlice 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 rune)
MakeChan returns a new open channel (simply a 'chan rune' 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 MakeRuneReaderChan ¶
func MakeRuneReaderChan() (out chan io.RuneReader)
MakeRuneReaderChan returns a new open channel (simply a 'chan io.RuneReader' that is).
Note: No 'RuneReader-producer' is launched here yet! (as is in all the other functions).
This is useful to easily create corresponding variables such as
var myRuneReaderPipelineStartsHere := MakeRuneReaderChan() // ... lot's of code to design and build Your favourite "myRuneReaderWorkflowPipeline" // ... // ... *before* You start pouring data into it, e.g. simply via: for drop := range water { myRuneReaderPipelineStartsHere <- drop } close(myRuneReaderPipelineStartsHere)
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 PipeRuneReaderBuffer) the channel is unbuffered.
func MakeRuneSChan ¶
func MakeRuneSChan() (out chan []rune)
MakeRuneSChan returns a new open channel (simply a 'chan []rune' that is).
Note: No 'RuneS-producer' is launched here yet! (as is in all the other functions).
This is useful to easily create corresponding variables such as
var myRuneSPipelineStartsHere := MakeRuneSChan() // ... lot's of code to design and build Your favourite "myRuneSWorkflowPipeline" // ... // ... *before* You start pouring data into it, e.g. simply via: for drop := range water { myRuneSPipelineStartsHere <- drop } close(myRuneSPipelineStartsHere)
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 PipeRuneSBuffer) the channel is unbuffered.
func MakeRuneScannerChan ¶
func MakeRuneScannerChan() (out chan io.RuneScanner)
MakeRuneScannerChan returns a new open channel (simply a 'chan io.RuneScanner' that is).
Note: No 'RuneScanner-producer' is launched here yet! (as is in all the other functions).
This is useful to easily create corresponding variables such as
var myRuneScannerPipelineStartsHere := MakeRuneScannerChan() // ... lot's of code to design and build Your favourite "myRuneScannerWorkflowPipeline" // ... // ... *before* You start pouring data into it, e.g. simply via: for drop := range water { myRuneScannerPipelineStartsHere <- drop } close(myRuneScannerPipelineStartsHere)
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 PipeRuneScannerBuffer) the channel is unbuffered.
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 PipeRuneReaderBuffer ¶
func PipeRuneReaderBuffer(inp <-chan io.RuneReader, cap int) (out <-chan io.RuneReader)
PipeRuneReaderBuffer returns a buffered channel with capacity cap to receive all inp before close.
func PipeRuneReaderFork ¶
func PipeRuneReaderFork(inp <-chan io.RuneReader) (out1, out2 <-chan io.RuneReader)
PipeRuneReaderFork 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 PipeRuneReaderFunc ¶
func PipeRuneReaderFunc(inp <-chan io.RuneReader, act func(a io.RuneReader) io.RuneReader) (out <-chan io.RuneReader)
PipeRuneReaderFunc returns a channel to receive every result of act applied to inp before close. Note: it 'could' be PipeRuneReaderMap for functional people, but 'map' has a very different meaning in go lang.
func PipeRuneSBuffer ¶
PipeRuneSBuffer returns a buffered channel with capacity cap to receive all inp before close.
func PipeRuneSFork ¶
PipeRuneSFork 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 PipeRuneSFunc ¶
PipeRuneSFunc returns a channel to receive every result of act applied to inp before close. Note: it 'could' be PipeRuneSMap for functional people, but 'map' has a very different meaning in go lang.
func PipeRuneScannerBuffer ¶
func PipeRuneScannerBuffer(inp <-chan io.RuneScanner, cap int) (out <-chan io.RuneScanner)
PipeRuneScannerBuffer returns a buffered channel with capacity cap to receive all inp before close.
func PipeRuneScannerFork ¶
func PipeRuneScannerFork(inp <-chan io.RuneScanner) (out1, out2 <-chan io.RuneScanner)
PipeRuneScannerFork 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 PipeRuneScannerFunc ¶
func PipeRuneScannerFunc(inp <-chan io.RuneScanner, act func(a io.RuneScanner) io.RuneScanner) (out <-chan io.RuneScanner)
PipeRuneScannerFunc returns a channel to receive every result of act applied to inp before close. Note: it 'could' be PipeRuneScannerMap for functional people, but 'map' has a very different meaning in go lang.
func RuneReaderDaisy ¶
func RuneReaderDaisy(inp <-chan io.RuneReader, tube RuneReaderTube) (out <-chan io.RuneReader)
RuneReaderDaisy returns a channel to receive all inp after having passed thru tube.
func RuneReaderDaisyChain ¶
func RuneReaderDaisyChain(inp <-chan io.RuneReader, tubes ...RuneReaderTube) (out <-chan io.RuneReader)
RuneReaderDaisyChain returns a channel to receive all inp after having passed thru all tubes.
func RuneSDaisy ¶
RuneSDaisy returns a channel to receive all inp after having passed thru tube.
func RuneSDaisyChain ¶
RuneSDaisyChain returns a channel to receive all inp after having passed thru all tubes.
func RuneScannerDaisy ¶
func RuneScannerDaisy(inp <-chan io.RuneScanner, tube RuneScannerTube) (out <-chan io.RuneScanner)
RuneScannerDaisy returns a channel to receive all inp after having passed thru tube.
func RuneScannerDaisyChain ¶
func RuneScannerDaisyChain(inp <-chan io.RuneScanner, tubes ...RuneScannerTube) (out <-chan io.RuneScanner)
RuneScannerDaisyChain returns a channel to receive all inp after having passed thru all tubes.
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 SendProxyRuneReader ¶
func SendProxyRuneReader(out chan<- io.RuneReader) chan<- io.RuneReader
SendProxyRuneReader 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 SendProxyRuneS ¶
SendProxyRuneS 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 SendProxyRuneScanner ¶
func SendProxyRuneScanner(out chan<- io.RuneScanner) chan<- io.RuneScanner
SendProxyRuneScanner 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 RuneReaderTube ¶
type RuneReaderTube func(inp <-chan io.RuneReader, out <-chan io.RuneReader)
RuneReaderTube is the signature for a pipe function.
type RuneScannerTube ¶
type RuneScannerTube func(inp <-chan io.RuneScanner, out <-chan io.RuneScanner)
RuneScannerTube is the signature for a pipe function.