提交 225cce9c 编写于 作者: K Kegan Dougal

Prefix /api as per standards

上级 c3d549f6
......@@ -16,8 +16,8 @@ import (
// to clients which need to make outbound HTTP requests.
func setup(mux *http.ServeMux, httpClient *http.Client) {
mux.Handle("/metrics", prometheus.Handler())
mux.Handle("/send", prometheus.InstrumentHandler("send_message", util.MakeJSONAPI(&writers.SendMessage{})))
mux.Handle("/sync", prometheus.InstrumentHandler("sync", util.MakeJSONAPI(&readers.Sync{})))
mux.Handle("/api/send", prometheus.InstrumentHandler("send_message", util.MakeJSONAPI(&writers.SendMessage{})))
mux.Handle("/api/sync", prometheus.InstrumentHandler("sync", util.MakeJSONAPI(&readers.Sync{})))
}
func main() {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册