Documentation
¶
Index ¶
- Constants
- func Chan(inp ...string) (out <-chan string)
- func ChanFuncErr(act func() (string, error)) (out <-chan string)
- func ChanFuncNok(act func() (string, bool)) (out <-chan string)
- func ChanReader(inp ...*strings.Reader) (out <-chan *strings.Reader)
- func ChanReaderFuncErr(act func() (*strings.Reader, error)) (out <-chan *strings.Reader)
- func ChanReaderFuncNok(act func() (*strings.Reader, bool)) (out <-chan *strings.Reader)
- func ChanReaderSlice(inp ...[]*strings.Reader) (out <-chan *strings.Reader)
- func ChanReplacer(inp ...*strings.Replacer) (out <-chan *strings.Replacer)
- func ChanReplacerFuncErr(act func() (*strings.Replacer, error)) (out <-chan *strings.Replacer)
- func ChanReplacerFuncNok(act func() (*strings.Replacer, bool)) (out <-chan *strings.Replacer)
- func ChanReplacerSlice(inp ...[]*strings.Replacer) (out <-chan *strings.Replacer)
- func ChanSlice(inp ...[]string) (out <-chan string)
- func ChanStringS(inp ...[]string) (out <-chan []string)
- func ChanStringSFuncErr(act func() ([]string, error)) (out <-chan []string)
- func ChanStringSFuncNok(act func() ([]string, bool)) (out <-chan []string)
- func ChanStringSSlice(inp ...[][]string) (out <-chan []string)
- func Daisy(inp <-chan string, tube Tube) (out <-chan string)
- func DaisyChain(inp <-chan string, tubes ...Tube) (out <-chan string)
- func Done(inp <-chan string) (done <-chan struct{})
- func DoneFunc(inp <-chan string, act func(a string)) (out <-chan struct{})
- func DoneReader(inp <-chan *strings.Reader) (done <-chan struct{})
- func DoneReaderFunc(inp <-chan *strings.Reader, act func(a *strings.Reader)) (out <-chan struct{})
- func DoneReaderSlice(inp <-chan *strings.Reader) (done <-chan []*strings.Reader)
- func DoneReplacer(inp <-chan *strings.Replacer) (done <-chan struct{})
- func DoneReplacerFunc(inp <-chan *strings.Replacer, act func(a *strings.Replacer)) (out <-chan struct{})
- func DoneReplacerSlice(inp <-chan *strings.Replacer) (done <-chan []*strings.Replacer)
- func DoneSlice(inp <-chan string) (done <-chan []string)
- func DoneStringS(inp <-chan []string) (done <-chan struct{})
- func DoneStringSFunc(inp <-chan []string, act func(a []string)) (out <-chan struct{})
- func DoneStringSSlice(inp <-chan []string) (done <-chan [][]string)
- func Join(out chan<- string, inp ...string) (done <-chan struct{})
- func JoinChan(out chan<- string, inp <-chan string) (done <-chan struct{})
- func JoinReader(out chan<- *strings.Reader, inp ...*strings.Reader) (done <-chan struct{})
- func JoinReaderChan(out chan<- *strings.Reader, inp <-chan *strings.Reader) (done <-chan struct{})
- func JoinReaderSlice(out chan<- *strings.Reader, inp ...[]*strings.Reader) (done <-chan struct{})
- func JoinReplacer(out chan<- *strings.Replacer, inp ...*strings.Replacer) (done <-chan struct{})
- func JoinReplacerChan(out chan<- *strings.Replacer, inp <-chan *strings.Replacer) (done <-chan struct{})
- func JoinReplacerSlice(out chan<- *strings.Replacer, inp ...[]*strings.Replacer) (done <-chan struct{})
- func JoinSlice(out chan<- string, inp ...[]string) (done <-chan struct{})
- func JoinStringS(out chan<- []string, inp ...[]string) (done <-chan struct{})
- func JoinStringSChan(out chan<- []string, inp <-chan []string) (done <-chan struct{})
- func JoinStringSSlice(out chan<- []string, inp ...[][]string) (done <-chan struct{})
- func MakeChan() (out chan string)
- func MakeReaderChan() (out chan *strings.Reader)
- func MakeReplacerChan() (out chan *strings.Replacer)
- func MakeStringSChan() (out chan []string)
- func PipeBuffer(inp <-chan string, cap int) (out <-chan string)
- func PipeFork(inp <-chan string) (out1, out2 <-chan string)
- func PipeFunc(inp <-chan string, act func(a string) string) (out <-chan string)
- func PipeReaderBuffer(inp <-chan *strings.Reader, cap int) (out <-chan *strings.Reader)
- func PipeReaderFork(inp <-chan *strings.Reader) (out1, out2 <-chan *strings.Reader)
- func PipeReaderFunc(inp <-chan *strings.Reader, act func(a *strings.Reader) *strings.Reader) (out <-chan *strings.Reader)
- func PipeReplacerBuffer(inp <-chan *strings.Replacer, cap int) (out <-chan *strings.Replacer)
- func PipeReplacerFork(inp <-chan *strings.Replacer) (out1, out2 <-chan *strings.Replacer)
- func PipeReplacerFunc(inp <-chan *strings.Replacer, act func(a *strings.Replacer) *strings.Replacer) (out <-chan *strings.Replacer)
- func PipeStringSBuffer(inp <-chan []string, cap int) (out <-chan []string)
- func PipeStringSFork(inp <-chan []string) (out1, out2 <-chan []string)
- func PipeStringSFunc(inp <-chan []string, act func(a []string) []string) (out <-chan []string)
- func ReaderDaisy(inp <-chan *strings.Reader, tube ReaderTube) (out <-chan *strings.Reader)
- func ReaderDaisyChain(inp <-chan *strings.Reader, tubes ...ReaderTube) (out <-chan *strings.Reader)
- func ReplacerDaisy(inp <-chan *strings.Replacer, tube ReplacerTube) (out <-chan *strings.Replacer)
- func ReplacerDaisyChain(inp <-chan *strings.Replacer, tubes ...ReplacerTube) (out <-chan *strings.Replacer)
- func SendProxy(out chan<- string) chan<- string
- func SendProxyReader(out chan<- *strings.Reader) chan<- *strings.Reader
- func SendProxyReplacer(out chan<- *strings.Replacer) chan<- *strings.Replacer
- func SendProxyStringS(out chan<- []string) chan<- []string
- func StringSDaisy(inp <-chan []string, tube StringSTube) (out <-chan []string)
- func StringSDaisyChain(inp <-chan []string, tubes ...StringSTube) (out <-chan []string)
- type BasicInfo
- type BasicKind
- type ReaderTube
- type ReplacerTube
- type StringSTube
- 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 ReaderCAP = 10
ReaderCAP is the capacity of the buffered proxy channel
const ReaderQUE = 16
ReaderQUE is the allocated size of the circular queue
const ReplacerCAP = 10
ReplacerCAP is the capacity of the buffered proxy channel
const ReplacerQUE = 16
ReplacerQUE is the allocated size of the circular queue
const StringSCAP = 10
StringSCAP is the capacity of the buffered proxy channel
const StringSQUE = 16
StringSQUE 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 ChanReader ¶
ChanReader returns a channel to receive all inputs before close.
func ChanReaderFuncErr ¶
ChanReaderFuncErr returns a channel to receive all results of act until err != nil before close.
func ChanReaderFuncNok ¶
ChanReaderFuncNok returns a channel to receive all results of act until nok before close.
func ChanReaderSlice ¶
ChanReaderSlice returns a channel to receive all inputs before close.
func ChanReplacer ¶
ChanReplacer returns a channel to receive all inputs before close.
func ChanReplacerFuncErr ¶
ChanReplacerFuncErr returns a channel to receive all results of act until err != nil before close.
func ChanReplacerFuncNok ¶
ChanReplacerFuncNok returns a channel to receive all results of act until nok before close.
func ChanReplacerSlice ¶
ChanReplacerSlice returns a channel to receive all inputs before close.
func ChanStringS ¶
ChanStringS returns a channel to receive all inputs before close.
func ChanStringSFuncErr ¶
ChanStringSFuncErr returns a channel to receive all results of act until err != nil before close.
func ChanStringSFuncNok ¶
ChanStringSFuncNok returns a channel to receive all results of act until nok before close.
func ChanStringSSlice ¶
ChanStringSSlice 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 string) (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 DoneReader ¶
DoneReader returns a channel to receive one signal before close after inp has been drained.
func DoneReaderFunc ¶
DoneReaderFunc returns a channel to receive one signal before close after act has been applied to all inp.
func DoneReaderSlice ¶
DoneReaderSlice returns a channel which will receive a slice of all the Readers received on inp channel before close. Unlike DoneReader, a full slice is sent once, not just an event.
func DoneReplacer ¶
DoneReplacer returns a channel to receive one signal before close after inp has been drained.
func DoneReplacerFunc ¶
func DoneReplacerFunc(inp <-chan *strings.Replacer, act func(a *strings.Replacer)) (out <-chan struct{})
DoneReplacerFunc returns a channel to receive one signal before close after act has been applied to all inp.
func DoneReplacerSlice ¶
DoneReplacerSlice returns a channel which will receive a slice of all the Replacers received on inp channel before close. Unlike DoneReplacer, 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 DoneStringS ¶
func DoneStringS(inp <-chan []string) (done <-chan struct{})
DoneStringS returns a channel to receive one signal before close after inp has been drained.
func DoneStringSFunc ¶
DoneStringSFunc returns a channel to receive one signal before close after act has been applied to all inp.
func DoneStringSSlice ¶
DoneStringSSlice returns a channel which will receive a slice of all the StringSs received on inp channel before close. Unlike DoneStringS, 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 JoinReader ¶
JoinReader sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained
func JoinReaderChan ¶
JoinReaderChan sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained
func JoinReaderSlice ¶
JoinReaderSlice sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained
func JoinReplacer ¶
JoinReplacer sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained
func JoinReplacerChan ¶
func JoinReplacerChan(out chan<- *strings.Replacer, inp <-chan *strings.Replacer) (done <-chan struct{})
JoinReplacerChan sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained
func JoinReplacerSlice ¶
func JoinReplacerSlice(out chan<- *strings.Replacer, inp ...[]*strings.Replacer) (done <-chan struct{})
JoinReplacerSlice 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 JoinStringS ¶
JoinStringS sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained
func JoinStringSChan ¶
JoinStringSChan sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained
func JoinStringSSlice ¶
JoinStringSSlice 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 string)
MakeChan returns a new open channel (simply a 'chan string' 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 MakeReaderChan ¶
MakeReaderChan returns a new open channel (simply a 'chan *strings.Reader' that is).
Note: No 'Reader-producer' is launched here yet! (as is in all the other functions).
This is useful to easily create corresponding variables such as
var myReaderPipelineStartsHere := MakeReaderChan() // ... lot's of code to design and build Your favourite "myReaderWorkflowPipeline" // ... // ... *before* You start pouring data into it, e.g. simply via: for drop := range water { myReaderPipelineStartsHere <- drop } close(myReaderPipelineStartsHere)
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 PipeReaderBuffer) the channel is unbuffered.
func MakeReplacerChan ¶
MakeReplacerChan returns a new open channel (simply a 'chan *strings.Replacer' that is).
Note: No 'Replacer-producer' is launched here yet! (as is in all the other functions).
This is useful to easily create corresponding variables such as
var myReplacerPipelineStartsHere := MakeReplacerChan() // ... lot's of code to design and build Your favourite "myReplacerWorkflowPipeline" // ... // ... *before* You start pouring data into it, e.g. simply via: for drop := range water { myReplacerPipelineStartsHere <- drop } close(myReplacerPipelineStartsHere)
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 PipeReplacerBuffer) the channel is unbuffered.
func MakeStringSChan ¶
func MakeStringSChan() (out chan []string)
MakeStringSChan returns a new open channel (simply a 'chan []string' that is).
Note: No 'StringS-producer' is launched here yet! (as is in all the other functions).
This is useful to easily create corresponding variables such as
var myStringSPipelineStartsHere := MakeStringSChan() // ... lot's of code to design and build Your favourite "myStringSWorkflowPipeline" // ... // ... *before* You start pouring data into it, e.g. simply via: for drop := range water { myStringSPipelineStartsHere <- drop } close(myStringSPipelineStartsHere)
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 PipeStringSBuffer) 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 PipeReaderBuffer ¶
PipeReaderBuffer returns a buffered channel with capacity cap to receive all inp before close.
func PipeReaderFork ¶
PipeReaderFork 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 PipeReaderFunc ¶
func PipeReaderFunc(inp <-chan *strings.Reader, act func(a *strings.Reader) *strings.Reader) (out <-chan *strings.Reader)
PipeReaderFunc returns a channel to receive every result of act applied to inp before close. Note: it 'could' be PipeReaderMap for functional people, but 'map' has a very different meaning in go lang.
func PipeReplacerBuffer ¶
PipeReplacerBuffer returns a buffered channel with capacity cap to receive all inp before close.
func PipeReplacerFork ¶
PipeReplacerFork 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 PipeReplacerFunc ¶
func PipeReplacerFunc(inp <-chan *strings.Replacer, act func(a *strings.Replacer) *strings.Replacer) (out <-chan *strings.Replacer)
PipeReplacerFunc returns a channel to receive every result of act applied to inp before close. Note: it 'could' be PipeReplacerMap for functional people, but 'map' has a very different meaning in go lang.
func PipeStringSBuffer ¶
PipeStringSBuffer returns a buffered channel with capacity cap to receive all inp before close.
func PipeStringSFork ¶
PipeStringSFork 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 PipeStringSFunc ¶
PipeStringSFunc returns a channel to receive every result of act applied to inp before close. Note: it 'could' be PipeStringSMap for functional people, but 'map' has a very different meaning in go lang.
func ReaderDaisy ¶
func ReaderDaisy(inp <-chan *strings.Reader, tube ReaderTube) (out <-chan *strings.Reader)
ReaderDaisy returns a channel to receive all inp after having passed thru tube.
func ReaderDaisyChain ¶
func ReaderDaisyChain(inp <-chan *strings.Reader, tubes ...ReaderTube) (out <-chan *strings.Reader)
ReaderDaisyChain returns a channel to receive all inp after having passed thru all tubes.
func ReplacerDaisy ¶
func ReplacerDaisy(inp <-chan *strings.Replacer, tube ReplacerTube) (out <-chan *strings.Replacer)
ReplacerDaisy returns a channel to receive all inp after having passed thru tube.
func ReplacerDaisyChain ¶
func ReplacerDaisyChain(inp <-chan *strings.Replacer, tubes ...ReplacerTube) (out <-chan *strings.Replacer)
ReplacerDaisyChain 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 SendProxyReader ¶
SendProxyReader 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 SendProxyReplacer ¶
SendProxyReplacer 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 SendProxyStringS ¶
SendProxyStringS 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 StringSDaisy ¶
func StringSDaisy(inp <-chan []string, tube StringSTube) (out <-chan []string)
StringSDaisy returns a channel to receive all inp after having passed thru tube.
func StringSDaisyChain ¶
func StringSDaisyChain(inp <-chan []string, tubes ...StringSTube) (out <-chan []string)
StringSDaisyChain returns a channel to receive all inp after having passed thru all tubes.
Types ¶
type BasicInfo ¶
type BasicInfo int
BasicInfo is a set of flags describing properties of a basic type.
type ReaderTube ¶
ReaderTube is the signature for a pipe function.
type ReplacerTube ¶
ReplacerTube is the signature for a pipe function.
type StringSTube ¶
StringSTube is the signature for a pipe function.