Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Sig ¶
Sig will send the Completed or Failed event to s depending on err being set if s is not nil.
func SigAll ¶
SigAll send the Completed or Failed event to all given signalers depending on err being set.
Types ¶
type Canceler ¶
type Canceler struct {
// contains filtered or unexported fields
}
type SignalCallback ¶
type SignalCallback func(SignalResponse)
SignalCallback converts a function accepting SignalResponse into a Signaler.
func (SignalCallback) Canceled ¶
func (f SignalCallback) Canceled()
func (SignalCallback) Completed ¶
func (f SignalCallback) Completed()
func (SignalCallback) Failed ¶
func (f SignalCallback) Failed()
type SignalChannel ¶
type SignalChannel struct {
C chan SignalResponse
}
func NewSignalChannel ¶
func NewSignalChannel() *SignalChannel
func (*SignalChannel) Canceled ¶
func (s *SignalChannel) Canceled()
func (*SignalChannel) Completed ¶
func (s *SignalChannel) Completed()
func (*SignalChannel) Failed ¶
func (s *SignalChannel) Failed()
func (*SignalChannel) Wait ¶
func (s *SignalChannel) Wait() SignalResponse
type SignalResponse ¶
type SignalResponse uint8
const ( SignalCompleted SignalResponse = iota + 1 SignalFailed SignalCanceled )
func (SignalResponse) Apply ¶
func (code SignalResponse) Apply(s Signaler)
Source Files
¶
- cancel.go
- signal.go
- signal_util.go
Click to show internal directories.
Click to hide internal directories.