Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrorClosed is returned when the object is closed multiple times ErrorClosed = errors.New("CloseFlag was already closed. This is harmless.") )
Functions ¶
This section is empty.
Types ¶
type CloseFlag ¶
type CloseFlag struct { // CloseFunc will be called the first time Close is called. It is allowed to call Close itself CloseFunc func() error // contains filtered or unexported fields }
CloseFlag is a simple object that has a close function that closes a channel and can be called many times
func (*CloseFlag) Chan ¶
func (c *CloseFlag) Chan() <-chan (struct{})
Chan returns a channel that will be closed upon closing the CloseFlag
Click to show internal directories.
Click to hide internal directories.