Ejemplo n.º 1
0
func agentStatus(w http.ResponseWriter, r *http.Request) (*httpapi.APIResponse, error) {
	log.Debug("apihandler", "agentStatus called")
	status := make(map[string]interface{})

	status["date"] = time.Now().String()

	status["status"] = manager.Status()

	return &httpapi.APIResponse{Data: status, HTTPCode: 200}, nil
}
Ejemplo n.º 2
0
func jobList(w http.ResponseWriter, r *http.Request) (*httpapi.APIResponse, error) {
	jobs := manager.Status()

	return &httpapi.APIResponse{Data: jobs, HTTPCode: 200}, nil
}