pat

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chan

type Chan interface {
	ROnlyChan // aka "<-chan" - receive only
	SOnlyChan // aka "chan<-" - send only
}

Chan represents a bidirectional channel

type PatSChan

type PatSChan interface {
	PatSROnlyChan // aka "<-chan" - receive only
	PatSSOnlyChan // aka "chan<-" - send only
}

PatSChan represents a bidirectional channel

type PatSROnlyChan

type PatSROnlyChan interface {
	RequestPatS() (dat []struct{})        // the receive function - aka "MyPatS := <-MyPatSROnlyChan"
	TryPatS() (dat []struct{}, open bool) // the multi-valued comma-ok receive function - aka "MyPatS, ok := <-MyPatSROnlyChan"
}

PatSROnlyChan represents a receive-only channel

type PatSSOnlyChan

type PatSSOnlyChan interface {
	ProvidePatS(dat []struct{}) // the send function - aka "MyKind <- some PatS"
}

PatSSOnlyChan represents a send-only channel

type ROnlyChan

type ROnlyChan interface {
	Request() (dat struct{})        // the receive function - aka "My := <-MyROnlyChan"
	Try() (dat struct{}, open bool) // the multi-valued comma-ok receive function - aka "My, ok := <-MyROnlyChan"
}

ROnlyChan represents a receive-only channel

type SCh

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

SCh is a supply channel

func MakeSupplyBuff

func MakeSupplyBuff(cap int) *SCh

MakeSupplyBuff returns a (pointer to a) fresh buffered (with capacity cap) supply channel

func MakeSupplyChan

func MakeSupplyChan() *SCh

MakeSupplyChan returns a (pointer to a) fresh unbuffered supply channel

func (*SCh) Provide

func (c *SCh) Provide(dat struct{})

Provide is the send function - aka "MyKind <- some "

func (*SCh) Request

func (c *SCh) Request() (dat struct{})

Request is the receive function - aka "some <- MyKind"

func (*SCh) Try

func (c *SCh) Try() (dat struct{}, open bool)

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

type SChPatS

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

SChPatS is a supply channel

func MakeSupplyPatSBuff

func MakeSupplyPatSBuff(cap int) *SChPatS

MakeSupplyPatSBuff returns a (pointer to a) fresh buffered (with capacity cap) supply channel

func MakeSupplyPatSChan

func MakeSupplyPatSChan() *SChPatS

MakeSupplyPatSChan returns a (pointer to a) fresh unbuffered supply channel

func (*SChPatS) ProvidePatS

func (c *SChPatS) ProvidePatS(dat []struct{})

ProvidePatS is the send function - aka "MyKind <- some PatS"

func (*SChPatS) RequestPatS

func (c *SChPatS) RequestPatS() (dat []struct{})

RequestPatS is the receive function - aka "some PatS <- MyKind"

func (*SChPatS) TryPatS

func (c *SChPatS) TryPatS() (dat []struct{}, open bool)

TryPatS is the comma-ok multi-valued form of RequestPatS and reports whether a received value was sent before the PatS channel was closed.

type SOnlyChan

type SOnlyChan interface {
	Provide(dat struct{}) // the send function - aka "MyKind <- some "
}

SOnlyChan represents a send-only channel

Jump to

Keyboard shortcuts

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