Bus is an async event bus that allows subscriptions to behave as a bus themselves. When an event is published, it is sent to all subscribers asynchronously - a subscriber cannot block other subscribers. NOTE: this should probably be in util/event or something (not in provider/event)
| 22 | // |
| 23 | // NOTE: this should probably be in util/event or something (not in provider/event) |
| 24 | type Bus interface { |
| 25 | Publisher |
| 26 | Subscribe() (Subscriber, error) |
| 27 | Close() |
| 28 | Done() <-chan struct{} |
| 29 | } |
| 30 | |
| 31 | // Subscriber emits events it sees on the channel returned by Events(). |
| 32 | // A Clone() of a subscriber will emit all events that have not been emitted |
no outgoing calls
no test coverage detected