Mainflux.mainflux/writers/influxdb/api.go

21 lines
400 B
Go

// +build !test
package influxdb
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() http.Handler {
r := bone.New()
r.GetFunc("/version", mainflux.Version("influxdb-writer"))
r.Handle("/metrics", promhttp.Handler())
return r
}