Documentation
¶
Index ¶
- type ApplicationEvent
- type AsyncTypedPublisher
- type Listener
- type Multicaster
- type Publisher
- type SimpleMulticaster
- func (m *SimpleMulticaster) AddEventListener(listener Listener) error
- func (m *SimpleMulticaster) MulticastEvent(ctx context.Context, event ApplicationEvent) error
- func (m *SimpleMulticaster) MulticastEventAsync(ctx context.Context, event ApplicationEvent) error
- func (m *SimpleMulticaster) RemoveAllEventListeners()
- func (m *SimpleMulticaster) RemoveEventListener(eventListener Listener) error
- type TypedPublisher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApplicationEvent ¶
type AsyncTypedPublisher ¶
type AsyncTypedPublisher[E ApplicationEvent] interface { PublishEventAsync(ctx context.Context, event E) error }
type Listener ¶
type Listener interface {
OnEvent(ctx context.Context, event ApplicationEvent) error
SupportsEvent(event ApplicationEvent) bool
}
type Multicaster ¶
type Publisher ¶
type Publisher interface {
PublishEvent(ctx context.Context, event ApplicationEvent) error
PublishEventAsync(ctx context.Context, event ApplicationEvent) error
}
type SimpleMulticaster ¶
type SimpleMulticaster struct {
// contains filtered or unexported fields
}
func NewSimpleMulticaster ¶
func NewSimpleMulticaster() *SimpleMulticaster
func (*SimpleMulticaster) AddEventListener ¶
func (m *SimpleMulticaster) AddEventListener(listener Listener) error
func (*SimpleMulticaster) MulticastEvent ¶
func (m *SimpleMulticaster) MulticastEvent(ctx context.Context, event ApplicationEvent) error
func (*SimpleMulticaster) MulticastEventAsync ¶
func (m *SimpleMulticaster) MulticastEventAsync(ctx context.Context, event ApplicationEvent) error
func (*SimpleMulticaster) RemoveAllEventListeners ¶
func (m *SimpleMulticaster) RemoveAllEventListeners()
func (*SimpleMulticaster) RemoveEventListener ¶
func (m *SimpleMulticaster) RemoveEventListener(eventListener Listener) error
type TypedPublisher ¶
type TypedPublisher[E ApplicationEvent] interface { PublishEvent(ctx context.Context, event E) error }
Click to show internal directories.
Click to hide internal directories.