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

Side by Side Diff: impl/dummy/dummy.go

Issue 2512093002: Add support for Pull Queues to prod implementation. (Closed)
Patch Set: use time.Duration for leaseTime Created 4 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « filter/featureBreaker/tq.go ('k') | impl/memory/taskqueue.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The LUCI Authors. All rights reserved. 1 // Copyright 2015 The LUCI Authors. All rights reserved.
2 // Use of this source code is governed under the Apache License, Version 2.0 2 // Use of this source code is governed under the Apache License, Version 2.0
3 // that can be found in the LICENSE file. 3 // that can be found in the LICENSE file.
4 4
5 package dummy 5 package dummy
6 6
7 import ( 7 import (
8 "fmt" 8 "fmt"
9 "runtime" 9 "runtime"
10 "strings" 10 "strings"
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 118
119 // Memcache returns a dummy memcache.RawInterface implementation suitable for 119 // Memcache returns a dummy memcache.RawInterface implementation suitable for
120 // embedding. Every method panics with a message containing the name of the 120 // embedding. Every method panics with a message containing the name of the
121 // method which was unimplemented. 121 // method which was unimplemented.
122 func Memcache() memcache.RawInterface { return dummyMCInst } 122 func Memcache() memcache.RawInterface { return dummyMCInst }
123 123
124 /////////////////////////////////// tq //////////////////////////////////// 124 /////////////////////////////////// tq ////////////////////////////////////
125 125
126 type tq struct{} 126 type tq struct{}
127 127
128 func (tq) AddMulti([]*taskqueue.Task, string, taskqueue.RawTaskCB) error { panic (ni()) } 128 func (tq) AddMulti([]*taskqueue.Task, string, taskqueue.RawTaskCB) error { panic(ni()) }
129 func (tq) DeleteMulti([]*taskqueue.Task, string, taskqueue.RawCB) error { panic (ni()) } 129 func (tq) DeleteMulti([]*taskqueue.Task, string, taskqueue.RawCB) error { panic(ni()) }
130 func (tq) Purge(string) error { panic (ni()) } 130 func (tq) Lease(int, string, time.Duration) ([]*taskqueue.Task, error) { panic(ni()) }
131 func (tq) Stats([]string, taskqueue.RawStatsCB) error { panic (ni()) } 131 func (tq) LeaseByTag(int, string, time.Duration, string) ([]*taskqueue.Task, err or) { panic(ni()) }
132 func (tq) GetTestable() taskqueue.Testable { retur n nil } 132 func (tq) ModifyLease(*taskqueue.Task, string, time.Duration) error { panic(ni()) }
133 func (tq) Purge(string) error { panic(ni()) }
134 func (tq) Stats([]string, taskqueue.RawStatsCB) error { panic(ni()) }
135 func (tq) GetTestable() taskqueue.Testable { return nil }
133 136
134 var dummyTQInst = tq{} 137 var dummyTQInst = tq{}
135 138
136 // TaskQueue returns a dummy taskqueue.RawInterface implementation suitable for 139 // TaskQueue returns a dummy taskqueue.RawInterface implementation suitable for
137 // embedding. Every method panics with a message containing the name of the 140 // embedding. Every method panics with a message containing the name of the
138 // method which was unimplemented. 141 // method which was unimplemented.
139 func TaskQueue() taskqueue.RawInterface { return dummyTQInst } 142 func TaskQueue() taskqueue.RawInterface { return dummyTQInst }
140 143
141 /////////////////////////////////// i //////////////////////////////////// 144 /////////////////////////////////// i ////////////////////////////////////
142 145
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 func (mod) DefaultVersion(module string) (string, error) { panic(ni()) } 226 func (mod) DefaultVersion(module string) (string, error) { panic(ni()) }
224 func (mod) Start(module, version string) error { panic(ni()) } 227 func (mod) Start(module, version string) error { panic(ni()) }
225 func (mod) Stop(module, version string) error { panic(ni()) } 228 func (mod) Stop(module, version string) error { panic(ni()) }
226 229
227 var dummyModuleInst = mod{} 230 var dummyModuleInst = mod{}
228 231
229 // Module returns a dummy module.Interface implementation suitable for 232 // Module returns a dummy module.Interface implementation suitable for
230 // embedding. Every method panics with a message containing the name of the 233 // embedding. Every method panics with a message containing the name of the
231 // method which was unimplemented. 234 // method which was unimplemented.
232 func Module() module.RawInterface { return dummyModuleInst } 235 func Module() module.RawInterface { return dummyModuleInst }
OLDNEW
« no previous file with comments | « filter/featureBreaker/tq.go ('k') | impl/memory/taskqueue.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698