api

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2020 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Package api contains API-related concerns: endpoint definitions, middlewares and all resource representations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoggingMiddleware

func LoggingMiddleware(svc coap.Service, logger log.Logger) coap.Service

LoggingMiddleware adds logging facilities to the adapter.

func MakeCoAPHandler

func MakeCoAPHandler(svc coap.Service, l log.Logger) mux.HandlerFunc

MakeCoAPHandler creates handler for CoAP messages.

func MakeHTTPHandler

func MakeHTTPHandler() http.Handler

MakeHTTPHandler creates handler for version endpoint.

func MetricsMiddleware

func MetricsMiddleware(svc coap.Service, counter metrics.Counter, latency metrics.Histogram) coap.Service

MetricsMiddleware instruments adapter by tracking request count and latency.

Types

This section is empty.

Jump to

Keyboard shortcuts

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