IsRune

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: 2 Imported by: 0

Documentation

Index

Constants

View Source
const CAP = 10

CAP is the capacity of the buffered proxy channel

View Source
const QUE = 16

QUE is the allocated size of the circular queue

View Source
const RuneReaderCAP = 10

RuneReaderCAP is the capacity of the buffered proxy channel

View Source
const RuneReaderQUE = 16

RuneReaderQUE is the allocated size of the circular queue

View Source
const RuneSCAP = 10

RuneSCAP is the capacity of the buffered proxy channel

View Source
const RuneSQUE = 16

RuneSQUE is the allocated size of the circular queue

View Source
const RuneScannerCAP = 10

RuneScannerCAP is the capacity of the buffered proxy channel

View Source
const RuneScannerQUE = 16

RuneScannerQUE is the allocated size of the circular queue

Variables

This section is empty.

Functions

func Chan

func Chan(inp ...rune) chan rune

Chan returns a channel to receive all inputs before close.

func ChanFuncErr

func ChanFuncErr(act func() (rune, error)) <-chan rune

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

func ChanFuncNok

func ChanFuncNok(act func() (rune, bool)) <-chan rune

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

func ChanRuneReader

func ChanRuneReader(inp ...io.RuneReader) chan io.RuneReader

ChanRuneReader returns a channel to receive all inputs before close.

func ChanRuneReaderFuncErr

func ChanRuneReaderFuncErr(act func() (io.RuneReader, error)) <-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)) <-chan io.RuneReader

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

func ChanRuneReaderSlice

func ChanRuneReaderSlice(inp ...[]io.RuneReader) chan io.RuneReader

ChanRuneReaderSlice returns a channel to receive all inputs before close.

func ChanRuneS

func ChanRuneS(inp ...[]rune) chan []rune

ChanRuneS returns a channel to receive all inputs before close.

func ChanRuneSFuncErr

func ChanRuneSFuncErr(act func() ([]rune, error)) <-chan []rune

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

func ChanRuneSFuncNok

func ChanRuneSFuncNok(act func() ([]rune, bool)) <-chan []rune

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

func ChanRuneSSlice

func ChanRuneSSlice(inp ...[][]rune) chan []rune

ChanRuneSSlice returns a channel to receive all inputs before close.

func ChanRuneScanner

func ChanRuneScanner(inp ...io.RuneScanner) chan io.RuneScanner

ChanRuneScanner returns a channel to receive all inputs before close.

func ChanRuneScannerFuncErr

func ChanRuneScannerFuncErr(act func() (io.RuneScanner, error)) <-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)) <-chan io.RuneScanner

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

func ChanRuneScannerSlice

func ChanRuneScannerSlice(inp ...[]io.RuneScanner) chan io.RuneScanner

ChanRuneScannerSlice returns a channel to receive all inputs before close.

func ChanSlice

func ChanSlice(inp ...[]rune) chan rune

ChanSlice returns a channel to receive all inputs before close.

func Daisy

func Daisy(inp <-chan rune, tube Tube) (out <-chan rune)

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

func DaisyChain

func DaisyChain(inp <-chan rune, tubes ...Tube) (out <-chan rune)

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

func Done

func Done(inp <-chan rune) chan struct{}

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

func DoneFunc

func DoneFunc(inp <-chan rune, act func(a rune)) chan struct{}

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) 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)) 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) 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) chan struct{}

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

func DoneRuneSFunc

func DoneRuneSFunc(inp <-chan []rune, act func(a []rune)) chan struct{}

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

func DoneRuneSSlice

func DoneRuneSSlice(inp <-chan []rune) chan [][]rune

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) 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)) 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) 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

func DoneSlice(inp <-chan rune) chan []rune

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

func Join(out chan<- rune, inp ...rune) chan struct{}

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

func JoinChan

func JoinChan(out chan<- rune, inp <-chan rune) chan struct{}

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) 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) 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) 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

func JoinRuneS(out chan<- []rune, inp ...[]rune) chan struct{}

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

func JoinRuneSChan

func JoinRuneSChan(out chan<- []rune, inp <-chan []rune) chan struct{}

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

func JoinRuneSSlice

func JoinRuneSSlice(out chan<- []rune, inp ...[][]rune) chan struct{}

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) 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) 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) 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

func JoinSlice(out chan<- rune, inp ...[]rune) chan struct{}

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() 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() 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() 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() 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

func PipeBuffer(inp <-chan rune, cap int) chan rune

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

func PipeFork

func PipeFork(inp <-chan rune) (chan rune, chan rune)

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

func PipeFunc(inp <-chan rune, act func(a rune) rune) chan rune

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) 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) (chan io.RuneReader, 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) 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

func PipeRuneSBuffer(inp <-chan []rune, cap int) chan []rune

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

func PipeRuneSFork

func PipeRuneSFork(inp <-chan []rune) (chan []rune, chan []rune)

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

func PipeRuneSFunc(inp <-chan []rune, act func(a []rune) []rune) chan []rune

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) 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) (chan io.RuneScanner, 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) 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

func RuneSDaisy(inp <-chan []rune, tube RuneSTube) (out <-chan []rune)

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

func RuneSDaisyChain

func RuneSDaisyChain(inp <-chan []rune, tubes ...RuneSTube) (out <-chan []rune)

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

func SendProxy(out chan<- rune) chan<- rune

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

func SendProxyRuneS(out chan<- []rune) chan<- []rune

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 RuneSTube

type RuneSTube func(inp <-chan []rune, out <-chan []rune)

RuneSTube 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.

type Tube

type Tube func(inp <-chan rune, out <-chan rune)

Tube 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