mirror of
https://github.com/mainflux/mainflux.git
synced 2025-04-24 13:48:49 +08:00

* update or to sync with clients branch Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com> * Add empty lines Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com> * update inline constant Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com> * rebase pr to sync with master branch Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com> * update pr to sync with updated master #1849 Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com> --------- Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>
22 lines
468 B
Go
22 lines
468 B
Go
// Copyright (c) Mainflux
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
package api
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/go-zoo/bone"
|
|
"github.com/mainflux/mainflux"
|
|
"github.com/prometheus/client_golang/prometheus/promhttp"
|
|
)
|
|
|
|
// MakeHandler returns a HTTP handler for API endpoints.
|
|
func MakeHandler(instanceID string) http.Handler {
|
|
r := bone.New()
|
|
r.GetFunc("/health", mainflux.Health("lora-adapter", instanceID))
|
|
r.Handle("/metrics", promhttp.Handler())
|
|
|
|
return r
|
|
}
|