Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotRegistered = errors.New("Event handler not registered")
Functions ¶
This section is empty.
Types ¶
type Dispatcher ¶
Dispatcher sends event to subscribers
type Event ¶
type Event struct { TimeStamp time.Time `json:"time_stamp"` Type EventType `json:"type"` Data json.RawMessage `json:"message"` User string `json:"user"` }
Event represents application event
type InMemoryExecutor ¶
type InMemoryExecutor struct {
// contains filtered or unexported fields
}
func NewInMemoryExecutor ¶
func NewInMemoryExecutor() *InMemoryExecutor
func (*InMemoryExecutor) Execute ¶
func (r *InMemoryExecutor) Execute(e Event) error
type NatsDispatcher ¶
type NatsDispatcher struct {
URL string
}
NatsDispatcher dispatches events through nats queues
func NewNatsDispatcher ¶
func NewNatsDispatcher(URL string) *NatsDispatcher
NewNatsDispatcher creates NatsDispatcher instance
func (*NatsDispatcher) Send ¶
func (nd *NatsDispatcher) Send(e Event) error
Send implements event dispatcher interface
Click to show internal directories.
Click to hide internal directories.