Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(62)

Unified Diff: go/src/infra/tricium/service/gerrit-reporter/handlers.go

Issue 2125603002: Adds initial Tricium service GAE configs (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Adds copyright comments and infra testing files Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: go/src/infra/tricium/service/gerrit-reporter/handlers.go
diff --git a/go/src/infra/tricium/service/gerrit-reporter/handlers.go b/go/src/infra/tricium/service/gerrit-reporter/handlers.go
new file mode 100644
index 0000000000000000000000000000000000000000..ab9fee120bc0ae497aa4a3aeb9aad70cc091ac1d
--- /dev/null
+++ b/go/src/infra/tricium/service/gerrit-reporter/handlers.go
@@ -0,0 +1,30 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Package handlers implements HTTP handlers for the gerrit-reporter module.
+package handlers
+
+import (
+ "html/template"
+ "net/http"
+)
+
+func init() {
+ http.HandleFunc("/gerrit-reporter/status", statusPageHandler)
+ http.HandleFunc("/gerrit-reporter/queue-handler", queueHandler)
+}
+
+var basePage = template.Must(template.ParseFiles("templates/base.html"))
+
+func statusPageHandler(w http.ResponseWriter, r *http.Request) {
+ // TODO(emso): Add Gerrit reporter stats
+ data := map[string]interface{}{
+ "Msg": "Status of the Gerrit Reporter ...",
+ }
+ basePage.Execute(w, data)
+}
+
+func queueHandler(w http.ResponseWriter, r *http.Request) {
+ // TODO(emso): Process request and report event to Gerrit
+}

Powered by Google App Engine
This is Rietveld 408576698