Exemplo n.º 1
0
func init() {
	api.RegisterHandler("/node", "GET", api.AdminRequiredHandler(listNodeHandler))
	api.RegisterHandler("/node/apps/:appname/containers", "GET", api.AdminRequiredHandler(listContainersHandler))
	api.RegisterHandler("/node/:address/containers", "GET", api.AdminRequiredHandler(listContainersHandler))
	api.RegisterAdminHandler("/node/add", "POST", api.Handler(addNodeHandler))
	api.RegisterAdminHandler("/node/remove", "DELETE", api.Handler(removeNodeHandler))
	api.RegisterAdminHandler("/containers/move", "POST", api.Handler(moveContainersHandler))
}
Exemplo n.º 2
0
func init() {
	api.RegisterHandler("/node", "GET", api.AdminRequiredHandler(listNodeHandler))
	api.RegisterHandler("/node/apps/:appname/containers", "GET", api.AdminRequiredHandler(listContainersHandler))
	api.RegisterHandler("/node/:address/containers", "GET", api.AdminRequiredHandler(listContainersHandler))
	api.RegisterHandler("/node", "POST", api.AdminRequiredHandler(addNodeHandler))
	api.RegisterHandler("/node", "DELETE", api.AdminRequiredHandler(removeNodeHandler))
	api.RegisterAdminHandler("/container/:id/move", "POST", api.Handler(moveContainerHandler))
	api.RegisterAdminHandler("/containers/move", "POST", api.Handler(moveContainersHandler))
	api.RegisterAdminHandler("/containers/rebalance", "POST", api.Handler(rebalanceContainersHandler))
	api.RegisterHandler("/pool", "GET", api.AdminRequiredHandler(listPoolHandler))
	api.RegisterHandler("/pool", "POST", api.AdminRequiredHandler(addPoolHandler))
	api.RegisterHandler("/pool", "DELETE", api.AdminRequiredHandler(removePoolHandler))
	api.RegisterHandler("/pool/team", "POST", api.AdminRequiredHandler(addTeamToPoolHandler))
	api.RegisterHandler("/pool/team", "DELETE", api.AdminRequiredHandler(removeTeamToPoolHandler))
}