bufio

package
v0.0.0-...-5012a73 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 20, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const ReadWriterCAP = 10

ReadWriterCAP is the capacity of the buffered proxy channel

View Source
const ReadWriterQUE = 16

ReadWriterQUE is the allocated size of the circular queue

View Source
const ReaderCAP = 10

ReaderCAP is the capacity of the buffered proxy channel

View Source
const ReaderQUE = 16

ReaderQUE is the allocated size of the circular queue

View Source
const ScannerCAP = 10

ScannerCAP is the capacity of the buffered proxy channel

View Source
const ScannerQUE = 16

ScannerQUE is the allocated size of the circular queue

View Source
const SplitFuncCAP = 10

SplitFuncCAP is the capacity of the buffered proxy channel

View Source
const SplitFuncQUE = 16

SplitFuncQUE is the allocated size of the circular queue

View Source
const WriterCAP = 10

WriterCAP is the capacity of the buffered proxy channel

View Source
const WriterQUE = 16

WriterQUE is the allocated size of the circular queue

Variables

This section is empty.

Functions

func ChanReadWriter

func ChanReadWriter(inp ...*bufio.ReadWriter) chan *bufio.ReadWriter

ChanReadWriter returns a channel to receive all inputs before close.

func ChanReadWriterFuncErr

func ChanReadWriterFuncErr(act func() (*bufio.ReadWriter, error)) <-chan *bufio.ReadWriter

ChanReadWriterFuncErr returns a channel to receive all results of act until err != nil before close.

func ChanReadWriterFuncNok

func ChanReadWriterFuncNok(act func() (*bufio.ReadWriter, bool)) <-chan *bufio.ReadWriter

ChanReadWriterFuncNok returns a channel to receive all results of act until nok before close.

func ChanReadWriterSlice

func ChanReadWriterSlice(inp ...[]*bufio.ReadWriter) chan *bufio.ReadWriter

ChanReadWriterSlice returns a channel to receive all inputs before close.

func ChanReader

func ChanReader(inp ...*bufio.Reader) chan *bufio.Reader

ChanReader returns a channel to receive all inputs before close.

func ChanReaderFuncErr

func ChanReaderFuncErr(act func() (*bufio.Reader, error)) <-chan *bufio.Reader

ChanReaderFuncErr returns a channel to receive all results of act until err != nil before close.

func ChanReaderFuncNok

func ChanReaderFuncNok(act func() (*bufio.Reader, bool)) <-chan *bufio.Reader

ChanReaderFuncNok returns a channel to receive all results of act until nok before close.

func ChanReaderSlice

func ChanReaderSlice(inp ...[]*bufio.Reader) chan *bufio.Reader

ChanReaderSlice returns a channel to receive all inputs before close.

func ChanScanner

func ChanScanner(inp ...*bufio.Scanner) chan *bufio.Scanner

ChanScanner returns a channel to receive all inputs before close.

func ChanScannerFuncErr

func ChanScannerFuncErr(act func() (*bufio.Scanner, error)) <-chan *bufio.Scanner

ChanScannerFuncErr returns a channel to receive all results of act until err != nil before close.

func ChanScannerFuncNok

func ChanScannerFuncNok(act func() (*bufio.Scanner, bool)) <-chan *bufio.Scanner

ChanScannerFuncNok returns a channel to receive all results of act until nok before close.

func ChanScannerSlice

func ChanScannerSlice(inp ...[]*bufio.Scanner) chan *bufio.Scanner

ChanScannerSlice returns a channel to receive all inputs before close.

func ChanSplitFunc

func ChanSplitFunc(inp ...bufio.SplitFunc) chan bufio.SplitFunc

ChanSplitFunc returns a channel to receive all inputs before close.

func ChanSplitFuncFuncErr

func ChanSplitFuncFuncErr(act func() (bufio.SplitFunc, error)) <-chan bufio.SplitFunc

ChanSplitFuncFuncErr returns a channel to receive all results of act until err != nil before close.

func ChanSplitFuncFuncNok

func ChanSplitFuncFuncNok(act func() (bufio.SplitFunc, bool)) <-chan bufio.SplitFunc

ChanSplitFuncFuncNok returns a channel to receive all results of act until nok before close.

func ChanSplitFuncSlice

func ChanSplitFuncSlice(inp ...[]bufio.SplitFunc) chan bufio.SplitFunc

ChanSplitFuncSlice returns a channel to receive all inputs before close.

func ChanWriter

func ChanWriter(inp ...*bufio.Writer) chan *bufio.Writer

ChanWriter returns a channel to receive all inputs before close.

func ChanWriterFuncErr

func ChanWriterFuncErr(act func() (*bufio.Writer, error)) <-chan *bufio.Writer

ChanWriterFuncErr returns a channel to receive all results of act until err != nil before close.

func ChanWriterFuncNok

func ChanWriterFuncNok(act func() (*bufio.Writer, bool)) <-chan *bufio.Writer

ChanWriterFuncNok returns a channel to receive all results of act until nok before close.

func ChanWriterSlice

func ChanWriterSlice(inp ...[]*bufio.Writer) chan *bufio.Writer

ChanWriterSlice returns a channel to receive all inputs before close.

func DoneReadWriter

func DoneReadWriter(inp <-chan *bufio.ReadWriter) chan struct{}

DoneReadWriter returns a channel to receive one signal before close after inp has been drained.

func DoneReadWriterFunc

func DoneReadWriterFunc(inp <-chan *bufio.ReadWriter, act func(a *bufio.ReadWriter)) chan struct{}

DoneReadWriterFunc returns a channel to receive one signal before close after act has been applied to all inp.

func DoneReadWriterSlice

func DoneReadWriterSlice(inp <-chan *bufio.ReadWriter) chan []*bufio.ReadWriter

DoneReadWriterSlice returns a channel which will receive a slice of all the ReadWriters received on inp channel before close. Unlike DoneReadWriter, a full slice is sent once, not just an event.

func DoneReader

func DoneReader(inp <-chan *bufio.Reader) chan struct{}

DoneReader returns a channel to receive one signal before close after inp has been drained.

func DoneReaderFunc

func DoneReaderFunc(inp <-chan *bufio.Reader, act func(a *bufio.Reader)) chan struct{}

DoneReaderFunc returns a channel to receive one signal before close after act has been applied to all inp.

func DoneReaderSlice

func DoneReaderSlice(inp <-chan *bufio.Reader) chan []*bufio.Reader

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 DoneScanner

func DoneScanner(inp <-chan *bufio.Scanner) chan struct{}

DoneScanner returns a channel to receive one signal before close after inp has been drained.

func DoneScannerFunc

func DoneScannerFunc(inp <-chan *bufio.Scanner, act func(a *bufio.Scanner)) chan struct{}

DoneScannerFunc returns a channel to receive one signal before close after act has been applied to all inp.

func DoneScannerSlice

func DoneScannerSlice(inp <-chan *bufio.Scanner) chan []*bufio.Scanner

DoneScannerSlice returns a channel which will receive a slice of all the Scanners received on inp channel before close. Unlike DoneScanner, a full slice is sent once, not just an event.

func DoneSplitFunc

func DoneSplitFunc(inp <-chan bufio.SplitFunc) chan struct{}

DoneSplitFunc returns a channel to receive one signal before close after inp has been drained.

func DoneSplitFuncFunc

func DoneSplitFuncFunc(inp <-chan bufio.SplitFunc, act func(a bufio.SplitFunc)) chan struct{}

DoneSplitFuncFunc returns a channel to receive one signal before close after act has been applied to all inp.

func DoneSplitFuncSlice

func DoneSplitFuncSlice(inp <-chan bufio.SplitFunc) chan []bufio.SplitFunc

DoneSplitFuncSlice returns a channel which will receive a slice of all the SplitFuncs received on inp channel before close. Unlike DoneSplitFunc, a full slice is sent once, not just an event.

func DoneWriter

func DoneWriter(inp <-chan *bufio.Writer) chan struct{}

DoneWriter returns a channel to receive one signal before close after inp has been drained.

func DoneWriterFunc

func DoneWriterFunc(inp <-chan *bufio.Writer, act func(a *bufio.Writer)) chan struct{}

DoneWriterFunc returns a channel to receive one signal before close after act has been applied to all inp.

func DoneWriterSlice

func DoneWriterSlice(inp <-chan *bufio.Writer) chan []*bufio.Writer

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 JoinReadWriter

func JoinReadWriter(out chan<- *bufio.ReadWriter, inp ...*bufio.ReadWriter) chan struct{}

JoinReadWriter sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained

func JoinReadWriterChan

func JoinReadWriterChan(out chan<- *bufio.ReadWriter, inp <-chan *bufio.ReadWriter) chan struct{}

JoinReadWriterChan sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained

func JoinReadWriterSlice

func JoinReadWriterSlice(out chan<- *bufio.ReadWriter, inp ...[]*bufio.ReadWriter) chan struct{}

JoinReadWriterSlice sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained

func JoinReader

func JoinReader(out chan<- *bufio.Reader, inp ...*bufio.Reader) chan struct{}

JoinReader sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained

func JoinReaderChan

func JoinReaderChan(out chan<- *bufio.Reader, inp <-chan *bufio.Reader) chan struct{}

JoinReaderChan sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained

func JoinReaderSlice

func JoinReaderSlice(out chan<- *bufio.Reader, inp ...[]*bufio.Reader) chan struct{}

JoinReaderSlice sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained

func JoinScanner

func JoinScanner(out chan<- *bufio.Scanner, inp ...*bufio.Scanner) chan struct{}

JoinScanner sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained

func JoinScannerChan

func JoinScannerChan(out chan<- *bufio.Scanner, inp <-chan *bufio.Scanner) chan struct{}

JoinScannerChan sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained

func JoinScannerSlice

func JoinScannerSlice(out chan<- *bufio.Scanner, inp ...[]*bufio.Scanner) chan struct{}

JoinScannerSlice sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained

func JoinSplitFunc

func JoinSplitFunc(out chan<- bufio.SplitFunc, inp ...bufio.SplitFunc) chan struct{}

JoinSplitFunc sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained

func JoinSplitFuncChan

func JoinSplitFuncChan(out chan<- bufio.SplitFunc, inp <-chan bufio.SplitFunc) chan struct{}

JoinSplitFuncChan sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained

func JoinSplitFuncSlice

func JoinSplitFuncSlice(out chan<- bufio.SplitFunc, inp ...[]bufio.SplitFunc) chan struct{}

JoinSplitFuncSlice sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained

func JoinWriter

func JoinWriter(out chan<- *bufio.Writer, inp ...*bufio.Writer) chan struct{}

JoinWriter sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained

func JoinWriterChan

func JoinWriterChan(out chan<- *bufio.Writer, inp <-chan *bufio.Writer) chan struct{}

JoinWriterChan sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained

func JoinWriterSlice

func JoinWriterSlice(out chan<- *bufio.Writer, inp ...[]*bufio.Writer) chan struct{}

JoinWriterSlice sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained

func MakeReadWriterChan

func MakeReadWriterChan() chan *bufio.ReadWriter

MakeReadWriterChan returns a new open channel (simply a 'chan *bufio.ReadWriter' that is).

Note: No 'ReadWriter-producer' is launched here yet! (as is in all the other functions).

This is useful to easily create corresponding variables such as

var myReadWriterPipelineStartsHere := MakeReadWriterChan()
// ... lot's of code to design and build Your favourite "myReadWriterWorkflowPipeline"
// ...
// ... *before* You start pouring data into it, e.g. simply via:
for drop := range water {
	myReadWriterPipelineStartsHere <- drop
}
close(myReadWriterPipelineStartsHere)

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 PipeReadWriterBuffer) the channel is unbuffered.

func MakeReaderChan

func MakeReaderChan() chan *bufio.Reader

MakeReaderChan returns a new open channel (simply a 'chan *bufio.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 MakeScannerChan

func MakeScannerChan() chan *bufio.Scanner

MakeScannerChan returns a new open channel (simply a 'chan *bufio.Scanner' that is).

Note: No 'Scanner-producer' is launched here yet! (as is in all the other functions).

This is useful to easily create corresponding variables such as

var myScannerPipelineStartsHere := MakeScannerChan()
// ... lot's of code to design and build Your favourite "myScannerWorkflowPipeline"
// ...
// ... *before* You start pouring data into it, e.g. simply via:
for drop := range water {
	myScannerPipelineStartsHere <- drop
}
close(myScannerPipelineStartsHere)

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 PipeScannerBuffer) the channel is unbuffered.

func MakeSplitFuncChan

func MakeSplitFuncChan() chan bufio.SplitFunc

MakeSplitFuncChan returns a new open channel (simply a 'chan bufio.SplitFunc' that is).

Note: No 'SplitFunc-producer' is launched here yet! (as is in all the other functions).

This is useful to easily create corresponding variables such as

var mySplitFuncPipelineStartsHere := MakeSplitFuncChan()
// ... lot's of code to design and build Your favourite "mySplitFuncWorkflowPipeline"
// ...
// ... *before* You start pouring data into it, e.g. simply via:
for drop := range water {
	mySplitFuncPipelineStartsHere <- drop
}
close(mySplitFuncPipelineStartsHere)

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 PipeSplitFuncBuffer) the channel is unbuffered.

func MakeWriterChan

func MakeWriterChan() chan *bufio.Writer

MakeWriterChan returns a new open channel (simply a 'chan *bufio.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 PipeLines

func PipeLines(inp <-chan os.File) (out <-chan string)

PipeLines - an experiment

func PipeReadWriterBuffer

func PipeReadWriterBuffer(inp <-chan *bufio.ReadWriter, cap int) chan *bufio.ReadWriter

PipeReadWriterBuffer returns a buffered channel with capacity cap to receive all inp before close.

func PipeReadWriterFork

func PipeReadWriterFork(inp <-chan *bufio.ReadWriter) (chan *bufio.ReadWriter, chan *bufio.ReadWriter)

PipeReadWriterFork 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 PipeReadWriterFunc

func PipeReadWriterFunc(inp <-chan *bufio.ReadWriter, act func(a *bufio.ReadWriter) *bufio.ReadWriter) chan *bufio.ReadWriter

PipeReadWriterFunc returns a channel to receive every result of act applied to inp before close. Note: it 'could' be PipeReadWriterMap for functional people, but 'map' has a very different meaning in go lang.

func PipeReaderBuffer

func PipeReaderBuffer(inp <-chan *bufio.Reader, cap int) chan *bufio.Reader

PipeReaderBuffer returns a buffered channel with capacity cap to receive all inp before close.

func PipeReaderFork

func PipeReaderFork(inp <-chan *bufio.Reader) (chan *bufio.Reader, chan *bufio.Reader)

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 *bufio.Reader, act func(a *bufio.Reader) *bufio.Reader) chan *bufio.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 PipeScannerBuffer

func PipeScannerBuffer(inp <-chan *bufio.Scanner, cap int) chan *bufio.Scanner

PipeScannerBuffer returns a buffered channel with capacity cap to receive all inp before close.

func PipeScannerFork

func PipeScannerFork(inp <-chan *bufio.Scanner) (chan *bufio.Scanner, chan *bufio.Scanner)

PipeScannerFork 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 PipeScannerFunc

func PipeScannerFunc(inp <-chan *bufio.Scanner, act func(a *bufio.Scanner) *bufio.Scanner) chan *bufio.Scanner

PipeScannerFunc returns a channel to receive every result of act applied to inp before close. Note: it 'could' be PipeScannerMap for functional people, but 'map' has a very different meaning in go lang.

func PipeSplitFuncBuffer

func PipeSplitFuncBuffer(inp <-chan bufio.SplitFunc, cap int) chan bufio.SplitFunc

PipeSplitFuncBuffer returns a buffered channel with capacity cap to receive all inp before close.

func PipeSplitFuncFork

func PipeSplitFuncFork(inp <-chan bufio.SplitFunc) (chan bufio.SplitFunc, chan bufio.SplitFunc)

PipeSplitFuncFork 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 PipeSplitFuncFunc

func PipeSplitFuncFunc(inp <-chan bufio.SplitFunc, act func(a bufio.SplitFunc) bufio.SplitFunc) chan bufio.SplitFunc

PipeSplitFuncFunc returns a channel to receive every result of act applied to inp before close. Note: it 'could' be PipeSplitFuncMap for functional people, but 'map' has a very different meaning in go lang.

func PipeWriterBuffer

func PipeWriterBuffer(inp <-chan *bufio.Writer, cap int) chan *bufio.Writer

PipeWriterBuffer returns a buffered channel with capacity cap to receive all inp before close.

func PipeWriterFork

func PipeWriterFork(inp <-chan *bufio.Writer) (chan *bufio.Writer, chan *bufio.Writer)

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

func PipeWriterFunc(inp <-chan *bufio.Writer, act func(a *bufio.Writer) *bufio.Writer) chan *bufio.Writer

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 ReadWriterDaisy

func ReadWriterDaisy(inp <-chan *bufio.ReadWriter, tube ReadWriterTube) (out <-chan *bufio.ReadWriter)

ReadWriterDaisy returns a channel to receive all inp after having passed thru tube.

func ReadWriterDaisyChain

func ReadWriterDaisyChain(inp <-chan *bufio.ReadWriter, tubes ...ReadWriterTube) (out <-chan *bufio.ReadWriter)

ReadWriterDaisyChain returns a channel to receive all inp after having passed thru all tubes.

func ReadWriters

func ReadWriters(inp1 <-chan *bufio.Reader, inp2 <-chan *bufio.Writer) (out <-chan *bufio.ReadWriter)

ReadWriters - (r *Reader, w *Writer) *ReadWriter

func ReaderDaisy

func ReaderDaisy(inp <-chan *bufio.Reader, tube ReaderTube) (out <-chan *bufio.Reader)

ReaderDaisy returns a channel to receive all inp after having passed thru tube.

func ReaderDaisyChain

func ReaderDaisyChain(inp <-chan *bufio.Reader, tubes ...ReaderTube) (out <-chan *bufio.Reader)

ReaderDaisyChain returns a channel to receive all inp after having passed thru all tubes.

func ReaderSize

func ReaderSize(inp <-chan io.Reader, size int) (out <-chan *bufio.Reader)

ReaderSize - (w io.Reader, size int) *Reader

func Readers

func Readers(inp <-chan io.Reader) (out <-chan *bufio.Reader)

Readers - (w io.Reader) *Reader

func ScannerDaisy

func ScannerDaisy(inp <-chan *bufio.Scanner, tube ScannerTube) (out <-chan *bufio.Scanner)

ScannerDaisy returns a channel to receive all inp after having passed thru tube.

func ScannerDaisyChain

func ScannerDaisyChain(inp <-chan *bufio.Scanner, tubes ...ScannerTube) (out <-chan *bufio.Scanner)

ScannerDaisyChain returns a channel to receive all inp after having passed thru all tubes.

func Scanners

func Scanners(inp <-chan io.Reader) (out <-chan *bufio.Scanner)

Scanners - (r io.Reader) *Scanner

func SendProxyReadWriter

func SendProxyReadWriter(out chan<- *bufio.ReadWriter) chan<- *bufio.ReadWriter

SendProxyReadWriter 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

func SendProxyReader(out chan<- *bufio.Reader) chan<- *bufio.Reader

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 SendProxyScanner

func SendProxyScanner(out chan<- *bufio.Scanner) chan<- *bufio.Scanner

SendProxyScanner 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 SendProxySplitFunc

func SendProxySplitFunc(out chan<- bufio.SplitFunc) chan<- bufio.SplitFunc

SendProxySplitFunc 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

func SendProxyWriter(out chan<- *bufio.Writer) chan<- *bufio.Writer

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 SplitFuncDaisy

func SplitFuncDaisy(inp <-chan bufio.SplitFunc, tube SplitFuncTube) (out <-chan bufio.SplitFunc)

SplitFuncDaisy returns a channel to receive all inp after having passed thru tube.

func SplitFuncDaisyChain

func SplitFuncDaisyChain(inp <-chan bufio.SplitFunc, tubes ...SplitFuncTube) (out <-chan bufio.SplitFunc)

SplitFuncDaisyChain returns a channel to receive all inp after having passed thru all tubes.

func WriterDaisy

func WriterDaisy(inp <-chan *bufio.Writer, tube WriterTube) (out <-chan *bufio.Writer)

WriterDaisy returns a channel to receive all inp after having passed thru tube.

func WriterDaisyChain

func WriterDaisyChain(inp <-chan *bufio.Writer, tubes ...WriterTube) (out <-chan *bufio.Writer)

WriterDaisyChain returns a channel to receive all inp after having passed thru all tubes.

func WriterSize

func WriterSize(inp <-chan io.Writer, size int) (out <-chan *bufio.Writer)

WriterSize - (w io.Writer, size int) *Writer

func Writers

func Writers(inp <-chan io.Writer) (out <-chan *bufio.Writer)

Writers - (w io.Writer) *Writer

Types

type ReadWriterTube

type ReadWriterTube func(inp <-chan *bufio.ReadWriter, out <-chan *bufio.ReadWriter)

ReadWriterTube is the signature for a pipe function.

type ReaderTube

type ReaderTube func(inp <-chan *bufio.Reader, out <-chan *bufio.Reader)

ReaderTube is the signature for a pipe function.

type ScannerTube

type ScannerTube func(inp <-chan *bufio.Scanner, out <-chan *bufio.Scanner)

ScannerTube is the signature for a pipe function.

type SplitFuncTube

type SplitFuncTube func(inp <-chan bufio.SplitFunc, out <-chan bufio.SplitFunc)

SplitFuncTube is the signature for a pipe function.

type WriterTube

type WriterTube func(inp <-chan *bufio.Writer, out <-chan *bufio.Writer)

WriterTube is the signature for a pipe function.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL