IsBoolean

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

Documentation

Index

Constants

View Source
const BoolSCAP = 10

BoolSCAP is the capacity of the buffered proxy channel

View Source
const BoolSQUE = 16

BoolSQUE is the allocated size of the circular queue

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

Variables

This section is empty.

Functions

func BoolSDaisy

func BoolSDaisy(inp <-chan []bool, tube BoolSTube) (out <-chan []bool)

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

func BoolSDaisyChain

func BoolSDaisyChain(inp <-chan []bool, tubes ...BoolSTube) (out <-chan []bool)

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

func Chan

func Chan(inp ...bool) (out <-chan bool)

Chan returns a channel to receive all inputs before close.

func ChanBoolS

func ChanBoolS(inp ...[]bool) (out <-chan []bool)

ChanBoolS returns a channel to receive all inputs before close.

func ChanBoolSFuncErr

func ChanBoolSFuncErr(act func() ([]bool, error)) (out <-chan []bool)

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

func ChanBoolSFuncNok

func ChanBoolSFuncNok(act func() ([]bool, bool)) (out <-chan []bool)

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

func ChanBoolSSlice

func ChanBoolSSlice(inp ...[][]bool) (out <-chan []bool)

ChanBoolSSlice returns a channel to receive all inputs before close.

func ChanFuncErr

func ChanFuncErr(act func() (bool, error)) (out <-chan bool)

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

func ChanFuncNok

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

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

func ChanSlice

func ChanSlice(inp ...[]bool) (out <-chan bool)

ChanSlice returns a channel to receive all inputs before close.

func Daisy

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

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

func DaisyChain

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

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

func Done

func Done(inp <-chan bool) (done <-chan struct{})

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

func DoneBoolS

func DoneBoolS(inp <-chan []bool) (done <-chan struct{})

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

func DoneBoolSFunc

func DoneBoolSFunc(inp <-chan []bool, act func(a []bool)) (out <-chan struct{})

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

func DoneBoolSSlice

func DoneBoolSSlice(inp <-chan []bool) (done <-chan [][]bool)

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

func DoneFunc

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

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

func DoneSlice

func DoneSlice(inp <-chan bool) (done <-chan []bool)

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<- bool, inp ...bool) (done <-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 JoinBoolS

func JoinBoolS(out chan<- []bool, inp ...[]bool) (done <-chan struct{})

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

func JoinBoolSChan

func JoinBoolSChan(out chan<- []bool, inp <-chan []bool) (done <-chan struct{})

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

func JoinBoolSSlice

func JoinBoolSSlice(out chan<- []bool, inp ...[][]bool) (done <-chan struct{})

JoinBoolSSlice 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<- bool, inp <-chan bool) (done <-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 JoinSlice

func JoinSlice(out chan<- bool, inp ...[]bool) (done <-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 MakeBoolSChan

func MakeBoolSChan() (out chan []bool)

MakeBoolSChan returns a new open channel (simply a 'chan []bool' that is).

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

This is useful to easily create corresponding variables such as

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

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

func MakeChan

func MakeChan() (out chan bool)

MakeChan returns a new open channel (simply a 'chan bool' 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 PipeBoolSBuffer

func PipeBoolSBuffer(inp <-chan []bool, cap int) (out <-chan []bool)

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

func PipeBoolSFork

func PipeBoolSFork(inp <-chan []bool) (out1, out2 <-chan []bool)

PipeBoolSFork 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 PipeBoolSFunc

func PipeBoolSFunc(inp <-chan []bool, act func(a []bool) []bool) (out <-chan []bool)

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

func PipeBuffer

func PipeBuffer(inp <-chan bool, cap int) (out <-chan bool)

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

func PipeFork

func PipeFork(inp <-chan bool) (out1, out2 <-chan bool)

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 bool, act func(a bool) bool) (out <-chan bool)

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 SendProxy

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

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 SendProxyBoolS

func SendProxyBoolS(out chan<- []bool) chan<- []bool

SendProxyBoolS 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 BasicInfo

type BasicInfo int

BasicInfo is a set of flags describing properties of a basic type.

const (
	IsBoolean BasicInfo = 1 << iota
	IsInteger
	IsUnsigned
	IsFloat
	IsComplex
	IsString
	IsUntyped

	IsOrdered   = IsInteger | IsFloat | IsString
	IsNumeric   = IsInteger | IsFloat | IsComplex
	IsConstType = IsBoolean | IsNumeric | IsString
)

Properties of basic types.

type BasicKind

type BasicKind int

BasicKind describes the kind of basic type.

type BoolSTube

type BoolSTube func(inp <-chan []bool, out <-chan []bool)

BoolSTube is the signature for a pipe function.

type Tube

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

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