Example #1
0
func (this *httpRequest) Execute(srvr *server.Server, signature value.Value, stopNotify chan bool) {
	defer this.stopAndClose(server.COMPLETED)

	this.NotifyStop(stopNotify)

	this.setHttpCode(http.StatusOK)
	_ = this.writePrefix(srvr, signature) &&
		this.writeResults()
	this.writeSuffix(srvr.Metrics(), "")
	this.writer.noMoreData()
}
Example #2
0
func (this *httpRequest) Failed(srvr *server.Server) {
	defer this.stopAndClose(server.FATAL)

	this.writeString("{\n")
	this.writeRequestID()
	this.writeClientContextID()
	this.writeErrors()
	this.writeWarnings()
	this.writeState("")
	this.writeMetrics(srvr.Metrics())
	this.writeString("\n}\n")
	this.writer.noMoreData()
}
Example #3
0
func (this *httpRequest) Execute(srvr *server.Server, signature value.Value, stopNotify chan bool) {
	this.NotifyStop(stopNotify)

	this.setHttpCode(http.StatusOK)
	_ = this.writePrefix(srvr, signature) &&
		this.writeResults()

	state := this.State()
	this.writeSuffix(srvr.Metrics(), state)
	this.writer.noMoreData()
	if state != server.TIMEOUT {
		this.stopAndClose(server.COMPLETED)
	} else {
		this.Close()
	}
}