Documentation
¶
Overview ¶
Package notifier provides a channel that can send update notifications. Specifically, a notifier automatically coalesces multiple notifications such that if a previous notification is already pending, a new notification will not be created. This is useful in scenarios like formatting changes, where if multiple updates come in before the first one is processed, it is preferable to apply just the final format, ignoring the intermediate ones.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Source ¶
type Source struct {
// contains filtered or unexported fields
}
Source can be used to notify multiple listeners of a signal. It provides both one-shot listeners that close the channel on the next signal, and continuous listeners that emit a struct{} on every signal (but need to be cleaned up).