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

Unified Diff: logdog/appengine/coordinator/tasks/routes.go

Issue 2989333002: [logdog] Replace Tumble with push queues. (Closed)
Patch Set: comments Created 3 years, 4 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
« no previous file with comments | « logdog/appengine/coordinator/tasks/archival.go ('k') | logdog/client/butler/output/logdog/output.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: logdog/appengine/coordinator/tasks/routes.go
diff --git a/logdog/appengine/coordinator/tasks/routes.go b/logdog/appengine/coordinator/tasks/routes.go
new file mode 100644
index 0000000000000000000000000000000000000000..d3b4fd52d4f8fb98875c82a7d27bf5ca48eb8f0f
--- /dev/null
+++ b/logdog/appengine/coordinator/tasks/routes.go
@@ -0,0 +1,41 @@
+// Copyright 2017 The LUCI Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package tasks
+
+import (
+ "github.com/luci/luci-go/logdog/api/endpoints/coordinator/services/v1"
+
+ "github.com/luci/luci-go/appengine/tq"
+ "github.com/luci/luci-go/server/router"
+)
+
+const (
+ // ArchivalTaskQueue is the name of the archival task queue.
+ ArchivalTaskQueue = "archival"
+)
+
+// Dispatcher is the task dispatcher that handles all tasks in this package.
+var taskDispatcher tq.Dispatcher
+
+// RegisterTasks registers all supported tasks with the supplied task queue
+// Dispatcher.
+func init() {
+ taskDispatcher.RegisterTask(&logdog.ArchiveDispatchTask{}, handleArchiveDispatchTask, ArchivalTaskQueue, nil)
+}
+
+// InstallHandlers registers task processing handlers into the supplied router.
+func InstallHandlers(r *router.Router, base router.MiddlewareChain) {
+ taskDispatcher.InstallRoutes(r, base)
+}
« no previous file with comments | « logdog/appengine/coordinator/tasks/archival.go ('k') | logdog/client/butler/output/logdog/output.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698