application

package
v0.0.0-...-40ca067 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 13, 2021 License: AGPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateRouterAndStartServing

func CreateRouterAndStartServing(log logging.Logger, db database.Datastore)

CreateRouterAndStartServing creates a request router, registers all handlers and starts serving requests

func NewStoreWaterTemperatureCommandHandler

func NewStoreWaterTemperatureCommandHandler(db database.Datastore, messenger MessagingContext) messaging.CommandHandler

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL