Documentation ¶
Index ¶
- Constants
- func ChanFile(inp ...*os.File) (out <-chan *os.File)
- func ChanFileFuncErr(act func() (*os.File, error)) (out <-chan *os.File)
- func ChanFileFuncNok(act func() (*os.File, bool)) (out <-chan *os.File)
- func ChanFileInfo(inp ...os.FileInfo) (out <-chan os.FileInfo)
- func ChanFileInfoFuncErr(act func() (os.FileInfo, error)) (out <-chan os.FileInfo)
- func ChanFileInfoFuncNok(act func() (os.FileInfo, bool)) (out <-chan os.FileInfo)
- func ChanFileInfoSlice(inp ...[]os.FileInfo) (out <-chan os.FileInfo)
- func ChanFileSlice(inp ...[]*os.File) (out <-chan *os.File)
- func ChanSignal(inp ...os.Signal) (out <-chan os.Signal)
- func ChanSignalFuncErr(act func() (os.Signal, error)) (out <-chan os.Signal)
- func ChanSignalFuncNok(act func() (os.Signal, bool)) (out <-chan os.Signal)
- func ChanSignalSlice(inp ...[]os.Signal) (out <-chan os.Signal)
- func DoneFile(inp <-chan *os.File) (done <-chan struct{})
- func DoneFileFunc(inp <-chan *os.File, act func(a *os.File)) (out <-chan struct{})
- func DoneFileInfo(inp <-chan os.FileInfo) (done <-chan struct{})
- func DoneFileInfoFunc(inp <-chan os.FileInfo, act func(a os.FileInfo)) (out <-chan struct{})
- func DoneFileInfoSlice(inp <-chan os.FileInfo) (done <-chan []os.FileInfo)
- func DoneFileSlice(inp <-chan *os.File) (done <-chan []*os.File)
- func DoneSignal(inp <-chan os.Signal) (done <-chan struct{})
- func DoneSignalFunc(inp <-chan os.Signal, act func(a os.Signal)) (out <-chan struct{})
- func DoneSignalSlice(inp <-chan os.Signal) (done <-chan []os.Signal)
- func FileDaisy(inp <-chan *os.File, tube FileTube) (out <-chan *os.File)
- func FileDaisyChain(inp <-chan *os.File, tubes ...FileTube) (out <-chan *os.File)
- func FileInfoDaisy(inp <-chan os.FileInfo, tube FileInfoTube) (out <-chan os.FileInfo)
- func FileInfoDaisyChain(inp <-chan os.FileInfo, tubes ...FileInfoTube) (out <-chan os.FileInfo)
- func JoinFile(out chan<- *os.File, inp ...*os.File) (done <-chan struct{})
- func JoinFileChan(out chan<- *os.File, inp <-chan *os.File) (done <-chan struct{})
- func JoinFileInfo(out chan<- os.FileInfo, inp ...os.FileInfo) (done <-chan struct{})
- func JoinFileInfoChan(out chan<- os.FileInfo, inp <-chan os.FileInfo) (done <-chan struct{})
- func JoinFileInfoSlice(out chan<- os.FileInfo, inp ...[]os.FileInfo) (done <-chan struct{})
- func JoinFileSlice(out chan<- *os.File, inp ...[]*os.File) (done <-chan struct{})
- func JoinSignal(out chan<- os.Signal, inp ...os.Signal) (done <-chan struct{})
- func JoinSignalChan(out chan<- os.Signal, inp <-chan os.Signal) (done <-chan struct{})
- func JoinSignalSlice(out chan<- os.Signal, inp ...[]os.Signal) (done <-chan struct{})
- func MakeFileChan() (out chan *os.File)
- func MakeFileInfoChan() (out chan os.FileInfo)
- func MakeSignalChan() (out chan os.Signal)
- func PipeFileBuffer(inp <-chan *os.File, cap int) (out <-chan *os.File)
- func PipeFileFork(inp <-chan *os.File) (out1, out2 <-chan *os.File)
- func PipeFileFunc(inp <-chan *os.File, act func(a *os.File) *os.File) (out <-chan *os.File)
- func PipeFileInfoBuffer(inp <-chan os.FileInfo, cap int) (out <-chan os.FileInfo)
- func PipeFileInfoFork(inp <-chan os.FileInfo) (out1, out2 <-chan os.FileInfo)
- func PipeFileInfoFunc(inp <-chan os.FileInfo, act func(a os.FileInfo) os.FileInfo) (out <-chan os.FileInfo)
- func PipeSignalBuffer(inp <-chan os.Signal, cap int) (out <-chan os.Signal)
- func PipeSignalFork(inp <-chan os.Signal) (out1, out2 <-chan os.Signal)
- func PipeSignalFunc(inp <-chan os.Signal, act func(a os.Signal) os.Signal) (out <-chan os.Signal)
- func SendProxyFile(out chan<- *os.File) chan<- *os.File
- func SendProxyFileInfo(out chan<- os.FileInfo) chan<- os.FileInfo
- func SendProxySignal(out chan<- os.Signal) chan<- os.Signal
- func SignalDaisy(inp <-chan os.Signal, tube SignalTube) (out <-chan os.Signal)
- func SignalDaisyChain(inp <-chan os.Signal, tubes ...SignalTube) (out <-chan os.Signal)
- type FileInfoTube
- type FileTube
- type SignalTube
Constants ¶
const FileCAP = 10
FileCAP is the capacity of the buffered proxy channel
const FileInfoCAP = 10
FileInfoCAP is the capacity of the buffered proxy channel
const FileInfoQUE = 16
FileInfoQUE is the allocated size of the circular queue
const FileQUE = 16
FileQUE is the allocated size of the circular queue
const SignalCAP = 10
SignalCAP is the capacity of the buffered proxy channel
const SignalQUE = 16
SignalQUE is the allocated size of the circular queue
Variables ¶
This section is empty.
Functions ¶
func ChanFileFuncErr ¶
ChanFileFuncErr returns a channel to receive all results of act until err != nil before close.
func ChanFileFuncNok ¶
ChanFileFuncNok returns a channel to receive all results of act until nok before close.
func ChanFileInfo ¶
ChanFileInfo returns a channel to receive all inputs before close.
func ChanFileInfoFuncErr ¶
ChanFileInfoFuncErr returns a channel to receive all results of act until err != nil before close.
func ChanFileInfoFuncNok ¶
ChanFileInfoFuncNok returns a channel to receive all results of act until nok before close.
func ChanFileInfoSlice ¶
ChanFileInfoSlice returns a channel to receive all inputs before close.
func ChanFileSlice ¶
ChanFileSlice returns a channel to receive all inputs before close.
func ChanSignal ¶
ChanSignal returns a channel to receive all inputs before close.
func ChanSignalFuncErr ¶
ChanSignalFuncErr returns a channel to receive all results of act until err != nil before close.
func ChanSignalFuncNok ¶
ChanSignalFuncNok returns a channel to receive all results of act until nok before close.
func ChanSignalSlice ¶
ChanSignalSlice returns a channel to receive all inputs before close.
func DoneFile ¶
DoneFile returns a channel to receive one signal before close after inp has been drained.
func DoneFileFunc ¶
DoneFileFunc returns a channel to receive one signal before close after act has been applied to all inp.
func DoneFileInfo ¶
DoneFileInfo returns a channel to receive one signal before close after inp has been drained.
func DoneFileInfoFunc ¶
DoneFileInfoFunc returns a channel to receive one signal before close after act has been applied to all inp.
func DoneFileInfoSlice ¶
DoneFileInfoSlice returns a channel which will receive a slice of all the FileInfos received on inp channel before close. Unlike DoneFileInfo, a full slice is sent once, not just an event.
func DoneFileSlice ¶
DoneFileSlice returns a channel which will receive a slice of all the Files received on inp channel before close. Unlike DoneFile, a full slice is sent once, not just an event.
func DoneSignal ¶
DoneSignal returns a channel to receive one signal before close after inp has been drained.
func DoneSignalFunc ¶
DoneSignalFunc returns a channel to receive one signal before close after act has been applied to all inp.
func DoneSignalSlice ¶
DoneSignalSlice returns a channel which will receive a slice of all the Signals received on inp channel before close. Unlike DoneSignal, a full slice is sent once, not just an event.
func FileDaisyChain ¶
FileDaisyChain returns a channel to receive all inp after having passed thru all tubes.
func FileInfoDaisy ¶
func FileInfoDaisy(inp <-chan os.FileInfo, tube FileInfoTube) (out <-chan os.FileInfo)
FileInfoDaisy returns a channel to receive all inp after having passed thru tube.
func FileInfoDaisyChain ¶
func FileInfoDaisyChain(inp <-chan os.FileInfo, tubes ...FileInfoTube) (out <-chan os.FileInfo)
FileInfoDaisyChain returns a channel to receive all inp after having passed thru all tubes.
func JoinFile ¶
JoinFile sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained
func JoinFileChan ¶
JoinFileChan sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained
func JoinFileInfo ¶
JoinFileInfo sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained
func JoinFileInfoChan ¶
JoinFileInfoChan sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained
func JoinFileInfoSlice ¶
JoinFileInfoSlice sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained
func JoinFileSlice ¶
JoinFileSlice sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained
func JoinSignal ¶
JoinSignal sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained
func JoinSignalChan ¶
JoinSignalChan sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained
func JoinSignalSlice ¶
JoinSignalSlice sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained
func MakeFileChan ¶
MakeFileChan returns a new open channel (simply a 'chan *os.File' that is).
Note: No 'File-producer' is launched here yet! (as is in all the other functions).
This is useful to easily create corresponding variables such as
var myFilePipelineStartsHere := MakeFileChan() // ... lot's of code to design and build Your favourite "myFileWorkflowPipeline" // ... // ... *before* You start pouring data into it, e.g. simply via: for drop := range water { myFilePipelineStartsHere <- drop } close(myFilePipelineStartsHere)
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 PipeFileBuffer) the channel is unbuffered.
func MakeFileInfoChan ¶
MakeFileInfoChan returns a new open channel (simply a 'chan os.FileInfo' that is).
Note: No 'FileInfo-producer' is launched here yet! (as is in all the other functions).
This is useful to easily create corresponding variables such as
var myFileInfoPipelineStartsHere := MakeFileInfoChan() // ... lot's of code to design and build Your favourite "myFileInfoWorkflowPipeline" // ... // ... *before* You start pouring data into it, e.g. simply via: for drop := range water { myFileInfoPipelineStartsHere <- drop } close(myFileInfoPipelineStartsHere)
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 PipeFileInfoBuffer) the channel is unbuffered.
func MakeSignalChan ¶
MakeSignalChan returns a new open channel (simply a 'chan os.Signal' that is).
Note: No 'Signal-producer' is launched here yet! (as is in all the other functions).
This is useful to easily create corresponding variables such as
var mySignalPipelineStartsHere := MakeSignalChan() // ... lot's of code to design and build Your favourite "mySignalWorkflowPipeline" // ... // ... *before* You start pouring data into it, e.g. simply via: for drop := range water { mySignalPipelineStartsHere <- drop } close(mySignalPipelineStartsHere)
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 PipeSignalBuffer) the channel is unbuffered.
func PipeFileBuffer ¶
PipeFileBuffer returns a buffered channel with capacity cap to receive all inp before close.
func PipeFileFork ¶
PipeFileFork 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 PipeFileFunc ¶
PipeFileFunc returns a channel to receive every result of act applied to inp before close. Note: it 'could' be PipeFileMap for functional people, but 'map' has a very different meaning in go lang.
func PipeFileInfoBuffer ¶
PipeFileInfoBuffer returns a buffered channel with capacity cap to receive all inp before close.
func PipeFileInfoFork ¶
PipeFileInfoFork 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 PipeFileInfoFunc ¶
func PipeFileInfoFunc(inp <-chan os.FileInfo, act func(a os.FileInfo) os.FileInfo) (out <-chan os.FileInfo)
PipeFileInfoFunc returns a channel to receive every result of act applied to inp before close. Note: it 'could' be PipeFileInfoMap for functional people, but 'map' has a very different meaning in go lang.
func PipeSignalBuffer ¶
PipeSignalBuffer returns a buffered channel with capacity cap to receive all inp before close.
func PipeSignalFork ¶
PipeSignalFork 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 PipeSignalFunc ¶
PipeSignalFunc returns a channel to receive every result of act applied to inp before close. Note: it 'could' be PipeSignalMap for functional people, but 'map' has a very different meaning in go lang.
func SendProxyFile ¶
SendProxyFile 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 SendProxyFileInfo ¶
SendProxyFileInfo 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 SendProxySignal ¶
SendProxySignal 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 SignalDaisy ¶
func SignalDaisy(inp <-chan os.Signal, tube SignalTube) (out <-chan os.Signal)
SignalDaisy returns a channel to receive all inp after having passed thru tube.
func SignalDaisyChain ¶
func SignalDaisyChain(inp <-chan os.Signal, tubes ...SignalTube) (out <-chan os.Signal)
SignalDaisyChain returns a channel to receive all inp after having passed thru all tubes.
Types ¶
type FileInfoTube ¶
FileInfoTube is the signature for a pipe function.