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 ¶
type BusOption func(*Bus)
Bus is a send/receive event bus.
func WithCustomBufferSize ¶
WithCustomBufferSize configures buffer size of underlying bus channel
func WithWaitGroup ¶
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 ¶
NewNeutral creates a new StatusNeutral event.
func NewOngoing ¶
NewOngoing creates a new StatusOngoing event.
Click to show internal directories.
Click to hide internal directories.