Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CommandHandler ¶
func CommandHandler(commandHandler eh.CommandHandler, commandType eh.CommandType) http.Handler
CommandHandler is a HTTP handler for eventhorizon.Commands. Commands must be registered with eventhorizon.RegisterCommand(). It expects a POST with a JSON body that will be unmarshalled into the command.
func EventBusHandler ¶
func EventBusHandler(eventPublisher eh.EventPublisher) http.Handler
EventBusHandler is a Websocket handler for eventhorizon.Events. Events will be forwarded to all requests that have been upgraded to websockets. TODO: Send events as JSON.
Types ¶
Click to show internal directories.
Click to hide internal directories.