package chi import ( peering "forge.cadoles.com/wpetit/go-http-peering" "forge.cadoles.com/wpetit/go-http-peering/server" "github.com/go-chi/chi" ) func Mount(r chi.Router, store peering.Store, funcs ...server.OptionFunc) { r.Post(peering.AdvertisePath, server.AdvertiseHandler(store, funcs...)) r.Group(func(r chi.Router) { r.Use(server.Authenticate(store, funcs...)) r.Post(peering.UpdatePath, server.UpdateHandler(store, funcs...)) r.Post(peering.PingPath, server.PingHandler(store, funcs...)) }) }