Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeAnyChannelBuff ¶
func MakeAnyChannelBuff(cap int) (out anyThingChannel)
MakeAnyChannelBuff returns a new open buffered channel with capacity `cap`.
func MakeAnyChannelChan ¶
func MakeAnyChannelChan() (out anyThingChannel)
MakeAnyChannelChan returns a new open channel (simply a 'chan Any' that is).
Note: No 'Any-producer' is launched here yet! (as is in all the other functions). This is useful to easily create corresponding variables such as: var myAnyPipelineStartsHere := MakeAnyChan() // ... lot's of code to design and build Your favourite "myAnyWorkflowPipeline" // ... // ... *before* You start pouring data into it, e.g. simply via: for drop := range water { myAnyPipelineStartsHere <- drop } close(myAnyPipelineStartsHere) 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 PipeAnyBuffer) the channel is unbuffered.
Types ¶
type AnyChanCore ¶
AnyChanCore represents basic methods common to every channel of Any elements
type AnyDemand ¶
type AnyDemand struct {
// contains filtered or unexported fields
}
AnyDemand is a demand channel
func MakeAnyDemandBuff ¶
MakeAnyDemandBuff returns a (pointer to a) fresh buffered (with capacity=`cap`) demand channel
func MakeAnyDemandChan ¶
func MakeAnyDemandChan() *AnyDemand
MakeAnyDemandChan returns a (pointer to a) fresh unbuffered demand channel
func (*AnyDemand) Provide ¶
func (c *AnyDemand) Provide(dat anyThing)
Provide is the send method - aka "myAnyChan <- myAny"
type AnyProvider ¶
type AnyProvider interface { AnyChanCore // close, len & cap // contains filtered or unexported methods }
AnyProvider represents a send-enabled channel of anyThing elements - aka `chan<-`
type AnyReceiver ¶
type AnyReceiver interface { AnyChanCore // close, len & cap // contains filtered or unexported methods }
AnyReceiver represents a receive-only channel of anyThing elements - aka `<-chan`
type AnySupply ¶
type AnySupply struct {
// contains filtered or unexported fields
}
AnySupply is a supply channel
func MakeAnySupplyBuff ¶
MakeAnySupplyBuff returns a (pointer to a) fresh buffered (with capacity=`cap`) supply channel
func MakeAnySupplyChan ¶
func MakeAnySupplyChan() *AnySupply
MakeAnySupplyChan returns a (pointer to a) fresh unbuffered supply channel
func (*AnySupply) Provide ¶
func (c *AnySupply) Provide(dat anyThing)
Provide is the send method - aka "myAnyChan <- myAny"