Documentation
¶
Overview ¶
Package events provides functionalities for packages to log their states as events for others to consume and display to end users in meaningful ways.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bus ¶
type Bus struct {
// contains filtered or unexported fields
}
Bus is a send/receive event bus.
type BusOption ¶ added in v0.21.0
type BusOption func(*Bus)
Bus is a send/receive event bus.
func WithCustomBufferSize ¶ added in v0.21.0
WithCustomBufferSize configures buffer size of underlying bus channel
func WithWaitGroup ¶ added in v0.21.0
WithWaitGroup sets wait group which is blocked if events bus is not empty.
type Event ¶
type Event struct {
// Description of the state.
Description string
// Status shows the current status of event.
Status Status
// TextColor of the text.
TextColor color.Color
// Icon of the text.
Icon string
}
Event represents a state.
func NewNeutral ¶ added in v0.21.0
NewNeutral creates a new StatusNeutral event.
func NewOngoing ¶ added in v0.21.0
NewOngoing creates a new StatusOngoing event.
Click to show internal directories.
Click to hide internal directories.