Exemple #1
0
func ResourceDescription(cx *goweb.Context) {
	LogRequest(cx.Request)
	r := resource{
		R:             []string{},
		F:             core.JobInfoIndexes,
		U:             apiUrl(cx) + "/",
		D:             siteUrl(cx) + "/",
		Title:         conf.TITLE,
		C:             conf.ADMIN_EMAIL,
		I:             "AWE",
		T:             core.Service,
		S:             core.QMgr.QueueStatus(),
		V:             conf.VERSION,
		Time:          time.Now().String(),
		GitCommitHash: conf.GIT_COMMIT_HASH,
	}
	if core.Service == "server" {
		r.R = []string{"job", "work", "client", "queue", "awf", "event"}
	} else if core.Service == "proxy" {
		r.R = []string{"client", "work"}
	}

	cx.WriteResponse(r, 200)
	return
}
Exemple #2
0
func ResourceDescription(cx *goweb.Context) {
	LogRequest(cx.Request)
	r := resource{
		R: []string{},
		U: apiUrl(cx) + "/",
		D: siteUrl(cx) + "/",
		C: conf.ADMIN_EMAIL,
		I: "AWE",
		T: core.Service,
	}
	if core.Service == "server" {
		r.R = []string{"job", "work", "client", "queue", "awf"}
	} else if core.Service == "proxy" {
		r.R = []string{"client", "work"}
	}

	cx.WriteResponse(r, 200)
}