Rename NewAPI to RegisterAPI

This commit is contained in:
Fabian Reinartz 2015-10-11 17:28:09 +02:00
parent 7933d0edba
commit 98fe623d60
2 changed files with 2 additions and 2 deletions

2
api.go
View File

@ -35,7 +35,7 @@ type API struct {
context func(r *http.Request) context.Context
}
func NewAPI(r *route.Router, alerts provider.Alerts, silences provider.Silences) *API {
func RegisterAPI(r *route.Router, alerts provider.Alerts, silences provider.Silences) *API {
api := &API{
context: route.Context,
alerts: alerts,

View File

@ -126,7 +126,7 @@ func main() {
}
router := route.New()
NewAPI(router.WithPrefix("/api/v1"), alerts, silences)
RegisterAPI(router.WithPrefix("/api/v1"), alerts, silences)
go http.ListenAndServe(*listenAddress, router)