OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 package taskqueue |
| 6 |
| 7 // RawCB is a simple callback for RawInterface.DeleteMulti, getting the error |
| 8 // for the attempted deletion. |
| 9 type RawCB func(error) |
| 10 |
| 11 // RawTaskCB is the callback for RawInterface.AddMulti, getting the added task |
| 12 // and an error. |
| 13 type RawTaskCB func(*Task, error) |
| 14 |
| 15 // RawStatsCB is the callback for RawInterface.Stats. It takes the statistics |
| 16 // object, as well as an error (e.g. in case the queue doesn't exist). |
| 17 type RawStatsCB func(*Statistics, error) |
| 18 |
| 19 // RawInterface is the full interface to the Task Queue service. |
| 20 type RawInterface interface { |
| 21 // AddMulti adds multiple tasks to the given queue, calling cb for each
item. |
| 22 // |
| 23 // The task passed to the callback function will have all the default va
lues |
| 24 // filled in, and will have the Name field populated, if the input task
was |
| 25 // anonymous (e.g. the Name field was blank). |
| 26 AddMulti(tasks []*Task, queueName string, cb RawTaskCB) error |
| 27 DeleteMulti(tasks []*Task, queueName string, cb RawCB) error |
| 28 |
| 29 Purge(queueName string) error |
| 30 |
| 31 Stats(queueNames []string, cb RawStatsCB) error |
| 32 } |
OLD | NEW |