Documentation
¶
Overview ¶
Package api contains API-related concerns: endpoint definitions, middlewares and all resource representations.
Index ¶
- func LoggingMiddleware(svc coap.Service, logger *slog.Logger) coap.Service
- func MakeCoAPHandler(svc coap.Service, channelsClient grpcChannelsV1.ChannelsServiceClient, ...) mux.Handler
- func MakeHandler(instanceID string) http.Handler
- func MetricsMiddleware(svc coap.Service, counter metrics.Counter, latency metrics.Histogram) coap.Service
- type CoAPHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoggingMiddleware ¶
LoggingMiddleware adds logging facilities to the adapter.
func MakeCoAPHandler ¶
func MakeCoAPHandler(svc coap.Service, channelsClient grpcChannelsV1.ChannelsServiceClient, parser messaging.TopicParser, l *slog.Logger) mux.Handler
MakeCoAPHandler creates handler for CoAP messages.
func MakeHandler ¶
MakeHandler returns a HTTP handler for API endpoints.
Types ¶
type CoAPHandler ¶ added in v0.17.0
type CoAPHandler struct {
// contains filtered or unexported fields
}
func (*CoAPHandler) ServeCOAP ¶ added in v0.17.0
func (h *CoAPHandler) ServeCOAP(w mux.ResponseWriter, m *mux.Message)
ServeCOAP implements the mux.Handler interface for handling CoAP messages.
Click to show internal directories.
Click to hide internal directories.