Mainflux.mainflux/writers/cassandra/api.go

21 lines
413 B
Go

// +build !test
package cassandra
import (
"net/http"
"github.com/go-zoo/bone"
"github.com/mainflux/mainflux"
"github.com/prometheus/client_golang/prometheus/promhttp"
)
// MakeHandler returns a HTTP API handler with version and metrics.
func MakeHandler() http.Handler {
r := bone.New()
r.GetFunc("/version", mainflux.Version("cassandra-writer"))
r.Handle("/metrics", promhttp.Handler())
return r
}