Documentation ¶
Overview ¶
Package api contains API-related concerns: endpoint definitions, middlewares and all resource representations.
Index ¶
- func LoggingMiddleware(svc mainflux.MessagePublisher, logger log.Logger) mainflux.MessagePublisher
- func MakeHandler(svc mainflux.MessagePublisher, tc mainflux.ThingsServiceClient) http.Handler
- func MetricsMiddleware(svc mainflux.MessagePublisher, counter metrics.Counter, ...) mainflux.MessagePublisher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoggingMiddleware ¶
func LoggingMiddleware(svc mainflux.MessagePublisher, logger log.Logger) mainflux.MessagePublisher
LoggingMiddleware adds logging facilities to the adapter.
func MakeHandler ¶
func MakeHandler(svc mainflux.MessagePublisher, tc mainflux.ThingsServiceClient) http.Handler
MakeHandler returns a HTTP handler for API endpoints.
func MetricsMiddleware ¶
func MetricsMiddleware(svc mainflux.MessagePublisher, counter metrics.Counter, latency metrics.Histogram) mainflux.MessagePublisher
MetricsMiddleware instruments adapter by tracking request count and latency.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.