Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
ErrNotRunning is the error with message "not running"
Functions ¶
func AfterThreadStart ¶
AfterThreadStart waits for the duration of delay thread start
Types ¶
type Bus ¶
type Bus interface { Publisher Subscribe() (Subscriber, error) Close() Done() <-chan struct{} }
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)
type Subscriber ¶
type Subscriber interface { Events() <-chan Event Clone() (Subscriber, error) Close() Done() <-chan struct{} }
Subscriber emits events it sees on the channel returned by Events(). A Clone() of a subscriber will emit all events that have not been emitted from the cloned subscriber. This is important so that events are not missed when adding subscribers for sub-components (see `provider/bidengine/{service,order}.go`)