Documentation
¶
Overview ¶
Package emitter owns the event channel: it filters, counts dropped events, and guarantees the done event is sent once and waited for.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Emitter ¶
type Emitter struct {
// contains filtered or unexported fields
}
func (*Emitter) Close ¶
func (e *Emitter) Close()
Close closes the channel. Events emitted afterwards are discarded.
func (*Emitter) Done ¶
Done records the outcome and sends the done event. Only the first call has any effect, so a run has exactly one outcome. Unlike Emit, a full channel does not drop it: the send waits for a reader for up to DoneGrace.
type Iterations ¶
type Iterations interface {
Iteration() int
}
Iterations says which iteration an event belongs to. → state.Run
type Options ¶
type Options struct {
Buffer int
StreamEvents bool // false: only Error and Done events are emitted
DoneGrace time.Duration // how long Done waits for a reader when the channel is full
}
Options are the emitter's fixed settings.
Click to show internal directories.
Click to hide internal directories.