Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChannelTimeout ¶
type ChannelTimeout interface { // Receive returns an object from the channel or an error if the timeout expires. // if timeout is zero then the receive block until an object is available. Receive(timeout time.Duration) (interface{}, error) // Send adds the given object into the channel or returns an error if the timeout expires. // if timeout is zero then the send block until the object is added. Send(obj interface{}, timeout time.Duration) error // Close the channel Close() error // Channel returns the underlying channel Channel() chan interface{} }
ChannelTimeout represents a go channel with timeout
func NewChannelTimeout ¶
func NewChannelTimeout(capacity int) ChannelTimeout
NewChannelTimeout creates a channel with timeout
Click to show internal directories.
Click to hide internal directories.