Documentation
¶
Index ¶
- Constants
- func ChanHeader(inp ...*tar.Header) chan *tar.Header
- func ChanHeaderFuncErr(act func() (*tar.Header, error)) <-chan *tar.Header
- func ChanHeaderFuncNil(act func() *tar.Header) <-chan *tar.Header
- func ChanHeaderFuncNok(act func() (*tar.Header, bool)) <-chan *tar.Header
- func ChanHeaderSlice(inp ...[]*tar.Header) chan *tar.Header
- func ChanReader(inp ...*tar.Reader) chan *tar.Reader
- func ChanReaderFuncErr(act func() (*tar.Reader, error)) <-chan *tar.Reader
- func ChanReaderFuncNil(act func() *tar.Reader) <-chan *tar.Reader
- func ChanReaderFuncNok(act func() (*tar.Reader, bool)) <-chan *tar.Reader
- func ChanReaderSlice(inp ...[]*tar.Reader) chan *tar.Reader
- func ChanWriter(inp ...*tar.Writer) chan *tar.Writer
- func ChanWriterFuncErr(act func() (*tar.Writer, error)) <-chan *tar.Writer
- func ChanWriterFuncNil(act func() *tar.Writer) <-chan *tar.Writer
- func ChanWriterFuncNok(act func() (*tar.Writer, bool)) <-chan *tar.Writer
- func ChanWriterSlice(inp ...[]*tar.Writer) chan *tar.Writer
- func DoneHeader(inp <-chan *tar.Header) chan struct{}
- func DoneHeaderFunc(inp <-chan *tar.Header, act func(a *tar.Header)) chan struct{}
- func DoneHeaderSlice(inp <-chan *tar.Header) chan []*tar.Header
- func DoneReader(inp <-chan *tar.Reader) chan struct{}
- func DoneReaderFunc(inp <-chan *tar.Reader, act func(a *tar.Reader)) chan struct{}
- func DoneReaderSlice(inp <-chan *tar.Reader) chan []*tar.Reader
- func DoneWriter(inp <-chan *tar.Writer) chan struct{}
- func DoneWriterFunc(inp <-chan *tar.Writer, act func(a *tar.Writer)) chan struct{}
- func DoneWriterSlice(inp <-chan *tar.Writer) chan []*tar.Writer
- func HeaderDaisy(inp <-chan *tar.Header, tube HeaderTube) (out <-chan *tar.Header)
- func HeaderDaisyChain(inp <-chan *tar.Header, tubes ...HeaderTube) (out <-chan *tar.Header)
- func JoinHeader(out chan<- *tar.Header, inp ...*tar.Header) chan struct{}
- func JoinHeaderChan(out chan<- *tar.Header, inp <-chan *tar.Header) chan struct{}
- func JoinHeaderSlice(out chan<- *tar.Header, inp ...[]*tar.Header) chan struct{}
- func JoinReader(out chan<- *tar.Reader, inp ...*tar.Reader) chan struct{}
- func JoinReaderChan(out chan<- *tar.Reader, inp <-chan *tar.Reader) chan struct{}
- func JoinReaderSlice(out chan<- *tar.Reader, inp ...[]*tar.Reader) chan struct{}
- func JoinWriter(out chan<- *tar.Writer, inp ...*tar.Writer) chan struct{}
- func JoinWriterChan(out chan<- *tar.Writer, inp <-chan *tar.Writer) chan struct{}
- func JoinWriterSlice(out chan<- *tar.Writer, inp ...[]*tar.Writer) chan struct{}
- func MakeHeaderChan() chan *tar.Header
- func MakeReaderChan() chan *tar.Reader
- func MakeWriterChan() chan *tar.Writer
- func PipeHeaderBuffer(inp <-chan *tar.Header, cap int) chan *tar.Header
- func PipeHeaderFork(inp <-chan *tar.Header) (chan *tar.Header, chan *tar.Header)
- func PipeHeaderFunc(inp <-chan *tar.Header, act func(a *tar.Header) *tar.Header) chan *tar.Header
- func PipeReaderBuffer(inp <-chan *tar.Reader, cap int) chan *tar.Reader
- func PipeReaderFork(inp <-chan *tar.Reader) (chan *tar.Reader, chan *tar.Reader)
- func PipeReaderFunc(inp <-chan *tar.Reader, act func(a *tar.Reader) *tar.Reader) chan *tar.Reader
- func PipeWriterBuffer(inp <-chan *tar.Writer, cap int) chan *tar.Writer
- func PipeWriterFork(inp <-chan *tar.Writer) (chan *tar.Writer, chan *tar.Writer)
- func PipeWriterFunc(inp <-chan *tar.Writer, act func(a *tar.Writer) *tar.Writer) chan *tar.Writer
- func ReaderDaisy(inp <-chan *tar.Reader, tube ReaderTube) (out <-chan *tar.Reader)
- func ReaderDaisyChain(inp <-chan *tar.Reader, tubes ...ReaderTube) (out <-chan *tar.Reader)
- func SendProxyHeader(out chan<- *tar.Header) chan<- *tar.Header
- func SendProxyReader(out chan<- *tar.Reader) chan<- *tar.Reader
- func SendProxyWriter(out chan<- *tar.Writer) chan<- *tar.Writer
- func WriterDaisy(inp <-chan *tar.Writer, tube WriterTube) (out <-chan *tar.Writer)
- func WriterDaisyChain(inp <-chan *tar.Writer, tubes ...WriterTube) (out <-chan *tar.Writer)
- type HeaderTube
- type ReaderTube
- type WriterTube
Constants ¶
const HeaderCAP = 10
HeaderCAP is the capacity of the buffered proxy channel
const HeaderQUE = 16
HeaderQUE 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 WriterCAP = 10
WriterCAP is the capacity of the buffered proxy channel
const WriterQUE = 16
WriterQUE is the allocated size of the circular queue
Variables ¶
This section is empty.
Functions ¶
func ChanHeader ¶
ChanHeader returns a channel to receive all inputs before close.
func ChanHeaderFuncErr ¶
ChanHeaderFuncErr returns a channel to receive all results of act until err != nil before close.
func ChanHeaderFuncNil ¶
ChanHeaderFuncNil returns a channel to receive all results of act until nil before close.
func ChanHeaderFuncNok ¶
ChanHeaderFuncNok returns a channel to receive all results of act until nok before close.
func ChanHeaderSlice ¶
ChanHeaderSlice returns a channel to receive all inputs 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 ChanReaderFuncNil ¶
ChanReaderFuncNil returns a channel to receive all results of act until 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 ChanWriter ¶
ChanWriter returns a channel to receive all inputs before close.
func ChanWriterFuncErr ¶
ChanWriterFuncErr returns a channel to receive all results of act until err != nil before close.
func ChanWriterFuncNil ¶
ChanWriterFuncNil returns a channel to receive all results of act until nil before close.
func ChanWriterFuncNok ¶
ChanWriterFuncNok returns a channel to receive all results of act until nok before close.
func ChanWriterSlice ¶
ChanWriterSlice returns a channel to receive all inputs before close.
func DoneHeader ¶
DoneHeader returns a channel to receive one signal before close after inp has been drained.
func DoneHeaderFunc ¶
DoneHeaderFunc returns a channel to receive one signal before close after act has been applied to all inp.
func DoneHeaderSlice ¶
DoneHeaderSlice returns a channel which will receive a slice of all the Headers received on inp channel before close. Unlike DoneHeader, a full slice is sent once, not just an event.
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 DoneWriter ¶
DoneWriter returns a channel to receive one signal before close after inp has been drained.
func DoneWriterFunc ¶
DoneWriterFunc returns a channel to receive one signal before close after act has been applied to all inp.
func DoneWriterSlice ¶
DoneWriterSlice returns a channel which will receive a slice of all the Writers received on inp channel before close. Unlike DoneWriter, a full slice is sent once, not just an event.
func HeaderDaisy ¶
func HeaderDaisy(inp <-chan *tar.Header, tube HeaderTube) (out <-chan *tar.Header)
HeaderDaisy returns a channel to receive all inp after having passed thru tube.
func HeaderDaisyChain ¶
func HeaderDaisyChain(inp <-chan *tar.Header, tubes ...HeaderTube) (out <-chan *tar.Header)
HeaderDaisyChain returns a channel to receive all inp after having passed thru all tubes.
func JoinHeader ¶
JoinHeader sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained
func JoinHeaderChan ¶
JoinHeaderChan sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained
func JoinHeaderSlice ¶
JoinHeaderSlice 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 JoinWriter ¶
JoinWriter sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained
func JoinWriterChan ¶
JoinWriterChan sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained
func JoinWriterSlice ¶
JoinWriterSlice sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained
func MakeHeaderChan ¶
MakeHeaderChan returns a new open channel (simply a 'chan *tar.Header' that is).
Note: No 'Header-producer' is launched here yet! (as is in all the other functions).
This is useful to easily create corresponding variables such as
var myHeaderPipelineStartsHere := MakeHeaderChan() // ... lot's of code to design and build Your favourite "myHeaderWorkflowPipeline" // ... // ... *before* You start pouring data into it, e.g. simply via: for drop := range water { myHeaderPipelineStartsHere <- drop } close(myHeaderPipelineStartsHere)
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 PipeHeaderBuffer) the channel is unbuffered.
func MakeReaderChan ¶
MakeReaderChan returns a new open channel (simply a 'chan *tar.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 MakeWriterChan ¶
MakeWriterChan returns a new open channel (simply a 'chan *tar.Writer' that is).
Note: No 'Writer-producer' is launched here yet! (as is in all the other functions).
This is useful to easily create corresponding variables such as
var myWriterPipelineStartsHere := MakeWriterChan() // ... lot's of code to design and build Your favourite "myWriterWorkflowPipeline" // ... // ... *before* You start pouring data into it, e.g. simply via: for drop := range water { myWriterPipelineStartsHere <- drop } close(myWriterPipelineStartsHere)
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 PipeWriterBuffer) the channel is unbuffered.
func PipeHeaderBuffer ¶
PipeHeaderBuffer returns a buffered channel with capacity cap to receive all inp before close.
func PipeHeaderFork ¶
PipeHeaderFork 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 PipeHeaderFunc ¶
PipeHeaderFunc returns a channel to receive every result of act applied to inp before close. Note: it 'could' be PipeHeaderMap 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 ¶
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 PipeWriterBuffer ¶
PipeWriterBuffer returns a buffered channel with capacity cap to receive all inp before close.
func PipeWriterFork ¶
PipeWriterFork 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 PipeWriterFunc ¶
PipeWriterFunc returns a channel to receive every result of act applied to inp before close. Note: it 'could' be PipeWriterMap for functional people, but 'map' has a very different meaning in go lang.
func ReaderDaisy ¶
func ReaderDaisy(inp <-chan *tar.Reader, tube ReaderTube) (out <-chan *tar.Reader)
ReaderDaisy returns a channel to receive all inp after having passed thru tube.
func ReaderDaisyChain ¶
func ReaderDaisyChain(inp <-chan *tar.Reader, tubes ...ReaderTube) (out <-chan *tar.Reader)
ReaderDaisyChain returns a channel to receive all inp after having passed thru all tubes.
func SendProxyHeader ¶
SendProxyHeader 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 SendProxyWriter ¶
SendProxyWriter 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 WriterDaisy ¶
func WriterDaisy(inp <-chan *tar.Writer, tube WriterTube) (out <-chan *tar.Writer)
WriterDaisy returns a channel to receive all inp after having passed thru tube.
func WriterDaisyChain ¶
func WriterDaisyChain(inp <-chan *tar.Writer, tubes ...WriterTube) (out <-chan *tar.Writer)
WriterDaisyChain returns a channel to receive all inp after having passed thru all tubes.
Types ¶
type HeaderTube ¶
HeaderTube is the signature for a pipe function.
type ReaderTube ¶
ReaderTube is the signature for a pipe function.