Documentation ¶
Index ¶
- func QueueName(event string, src EventSource) string
- type Cancellation
- type Event
- type EventBus
- func (bus *EventBus) Init()
- func (bus *EventBus) Run()
- func (bus *EventBus) Shutdown()
- func (bus *EventBus) Subscribe(subscriber EventSource, event string, source EventSource)
- func (bus *EventBus) Trigger(event Event, source EventSource)
- func (bus *EventBus) Unsubscribe(subscriber EventSource, event string, source EventSource)
- type EventChannel
- type EventMessage
- type EventQueue
- type EventSource
- type EventTransmitter
- type PropertyChanged
- type Subscription
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func QueueName ¶
func QueueName(event string, src EventSource) string
QueueName returns a canonical name for the channel that should be used for events of the given type and for the specified event source.
Types ¶
type Cancellation ¶
type Cancellation struct {
Subscription
}
func (Cancellation) EventName ¶
func (s Cancellation) EventName() string
type EventBus ¶
type EventBus struct {
// contains filtered or unexported fields
}
func (*EventBus) Subscribe ¶
func (bus *EventBus) Subscribe(subscriber EventSource, event string, source EventSource)
func (*EventBus) Trigger ¶
func (bus *EventBus) Trigger(event Event, source EventSource)
func (*EventBus) Unsubscribe ¶
func (bus *EventBus) Unsubscribe(subscriber EventSource, event string, source EventSource)
type EventChannel ¶
type EventChannel chan Event
type EventMessage ¶
type EventMessage struct { Content Event Source EventSource }
func (EventMessage) EventName ¶
func (msg EventMessage) EventName() string
type EventQueue ¶
type EventQueue struct { Relay EventChannel Subscribers map[Subscription]EventSource }
func NewEventQueue ¶
func NewEventQueue() *EventQueue
type EventSource ¶
type EventSource interface { // Channel that triggered events are send into EventChannel() EventChannel // Unique Identifier for this event source EventSourceID() uint64 }
type EventTransmitter ¶
type EventTransmitter interface { // Subscribes to events of given type and optionally (source > 0) to events // triggered by a specific other entity only Subscribe(subscriber EventSource, event string, source EventSource) Unsubscribe(subscriber EventSource, event string, source EventSource) // Triggers an event providing the ID of the originating entity Trigger(event Event, source EventSource) }
type PropertyChanged ¶
type PropertyChanged struct { }
type Subscription ¶
type Subscription struct { Subscriber EventSource EventType string Source EventSource }
func (Subscription) EventName ¶
func (s Subscription) EventName() string
Click to show internal directories.
Click to hide internal directories.