Discover Packages
github.com/nwtgck/piping-server-check
oneshot
package
Version:
v0.14.0
Opens a new window with list of versions in this module.
Published: Jun 3, 2024
License: MIT
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
type Oneshot[T any ] struct {
}
Oneshot is oneshot cached channel
NewOneshot makes new Oneshot
func (o *Oneshot [T]) Channel() <-chan T
Channel returns a channel to get value. The value is always returned when already Send() called no matter Done() called.
Channel returns a closed channel after Done() called without no Send() call.
Done finishes a channel from Channel()
Send sends value without blocking. Send panics when called multiple times.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.