Documentation ¶
Index ¶
- func CreateRouterAndStartServing(log logging.Logger, db database.Datastore)
- func NewStoreWaterTemperatureCommandHandler(db database.Datastore, messenger MessagingContext) messaging.CommandHandler
- func NewTemperatureReceiver(log logging.Logger, db database.Datastore) messaging.TopicMessageHandler
- func NewWaterTempReceiver(log logging.Logger, db database.Datastore) messaging.TopicMessageHandler
- type MessagingContext
- type RequestRouter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateRouterAndStartServing ¶
CreateRouterAndStartServing creates a request router, registers all handlers and starts serving requests
func NewStoreWaterTemperatureCommandHandler ¶
func NewStoreWaterTemperatureCommandHandler(db database.Datastore, messenger MessagingContext) messaging.CommandHandler
func NewTemperatureReceiver ¶
func NewWaterTempReceiver ¶
Types ¶
type MessagingContext ¶
type MessagingContext interface { PublishOnTopic(message messaging.TopicMessage) error NoteToSelf(message messaging.CommandMessage) error }
MessagingContext is an interface that allows mocking of messaging.Context parameters
type RequestRouter ¶
type RequestRouter struct {
// contains filtered or unexported fields
}
RequestRouter wraps the concrete router implementation
func (*RequestRouter) Get ¶
func (router *RequestRouter) Get(pattern string, handlerFn http.HandlerFunc)
Get accepts a pattern that should be routed to the handlerFn on a GET request
Click to show internal directories.
Click to hide internal directories.