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

Unified Diff: service/taskqueue/interface.go

Issue 1243323002: Refactor a bit. (Closed) Base URL: https://github.com/luci/gae.git@master
Patch Set: fix golint Created 5 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
« no previous file with comments | « service/taskqueue/errors.go ('k') | service/taskqueue/testable.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: service/taskqueue/interface.go
diff --git a/service/taskqueue/interface.go b/service/taskqueue/interface.go
new file mode 100644
index 0000000000000000000000000000000000000000..980a1bccd8d4919801593fd1d236ddf9a9d901a5
--- /dev/null
+++ b/service/taskqueue/interface.go
@@ -0,0 +1,22 @@
+// Copyright 2015 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 taskqueue
+
+// Interface is the full interface to the Task Queue service.
+type Interface interface {
+ Add(task *Task, queueName string) (*Task, error)
+ Delete(task *Task, queueName string) error
+
+ AddMulti(tasks []*Task, queueName string) ([]*Task, error)
+ DeleteMulti(tasks []*Task, queueName string) error
+
+ Lease(maxTasks int, queueName string, leaseTime int) ([]*Task, error)
+ LeaseByTag(maxTasks int, queueName string, leaseTime int, tag string) ([]*Task, error)
+ ModifyLease(task *Task, queueName string, leaseTime int) error
+
+ Purge(queueName string) error
+
+ QueueStats(queueNames []string) ([]Statistics, error)
+}
« no previous file with comments | « service/taskqueue/errors.go ('k') | service/taskqueue/testable.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698