empsc

package
v0.6.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 27, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Channel

type Channel interface {
	eidiom.Closer

	// Producer Create a new producer
	Producer() Producer
}

func New

func New(c Consumer, opts ...ChannelOpt) Channel

type ChannelOpt

type ChannelOpt func(o channelOpts) channelOpts

func ChannelBufSize

func ChannelBufSize(size int) ChannelOpt

type Consumer

type Consumer func(v interface{}) (err error)

type Producer

type Producer interface {
	// Send a value to the consumer. This func will block if a channel is full.
	Send(v interface{})
}

Producer of Multi producer, single consumer

Jump to

Keyboard shortcuts

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