Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Blocker ¶
type Blocker interface {
Blockit() <-chan struct{}
BlockitWithContext(ctx context.Context) <-chan struct{}
}
Blocker represents an object that will have a Blockit function as a method for determining when the object is done with a given task.
type MultiBlocker ¶
type MultiBlocker struct {
// contains filtered or unexported fields
}
MultiBlocker represent many blockers to monitor and determine when they are done.
func (*MultiBlocker) Add ¶
func (b *MultiBlocker) Add(blocker ...Blocker)
Add takes one to many blockers to append into the multiblocker
func (*MultiBlocker) Blockit ¶
func (b *MultiBlocker) Blockit() <-chan struct{}
Blockit meets the blocker interface and summarizes multiple blockers into a single channel for blocking on.
func (*MultiBlocker) BlockitWithContext ¶ added in v0.1.0
func (b *MultiBlocker) BlockitWithContext(ctx context.Context) <-chan struct{}
BlockitWithContext takes a context to include with the blockers. The multiblocker will return if the context is cancelled before the blockers finish.
Click to show internal directories.
Click to hide internal directories.