dot

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

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DChDot

type DChDot struct {
	// contains filtered or unexported fields
}

DChDot is a demand channel

func MakeDemandDotBuff

func MakeDemandDotBuff(cap int) *DChDot

MakeDemandDotBuff returns a (pointer to a) fresh buffered (with capacity cap) demand channel

func MakeDemandDotChan

func MakeDemandDotChan() *DChDot

MakeDemandDotChan returns a (pointer to a) fresh unbuffered demand channel

func (*DChDot) ProvideDot

func (c *DChDot) ProvideDot(dat *dot.Dot)

ProvideDot is the send function - aka "MyKind <- some Dot"

func (*DChDot) RequestDot

func (c *DChDot) RequestDot() (dat *dot.Dot)

RequestDot is the receive function - aka "some Dot <- MyKind"

func (*DChDot) TryDot

func (c *DChDot) TryDot() (dat *dot.Dot, open bool)

TryDot is the comma-ok multi-valued form of RequestDot and reports whether a received value was sent before the Dot channel was closed.

type DotChan

type DotChan interface {
	DotROnlyChan // aka "<-chan" - receive only
	DotSOnlyChan // aka "chan<-" - send only
}

DotChan represents a bidirectional channel

type DotROnlyChan

type DotROnlyChan interface {
	RequestDot() (dat *dot.Dot)        // the receive function - aka "MyDot := <-MyDotROnlyChan"
	TryDot() (dat *dot.Dot, open bool) // the multi-valued comma-ok receive function - aka "MyDot, ok := <-MyDotROnlyChan"
}

DotROnlyChan represents a receive-only channel

type DotSOnlyChan

type DotSOnlyChan interface {
	ProvideDot(dat *dot.Dot) // the send function - aka "MyKind <- some Dot"
}

DotSOnlyChan represents a send-only channel

Jump to

Keyboard shortcuts

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