Ejemplo n.º 1
0
//Handler for /nodemanager/start - add new Node
//mode: GET
//url: /nodemanager/start
func nodeStartHandler(nm *nodemanager.NodeManager) http.HandlerFunc {
	return func(w http.ResponseWriter, r *http.Request) {
		logger.Info("Starting Node")
		count := len(nm.NodesList)
		i := nm.AddNode()
		if i != count {
			wh.Error500(w)
		}

	}
}