OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 func Memcache() memcache.RawInterface { return dummyMCInst } | 110 func Memcache() memcache.RawInterface { return dummyMCInst } |
111 | 111 |
112 /////////////////////////////////// tq //////////////////////////////////// | 112 /////////////////////////////////// tq //////////////////////////////////// |
113 | 113 |
114 type tq struct{} | 114 type tq struct{} |
115 | 115 |
116 func (tq) AddMulti([]*taskqueue.Task, string, taskqueue.RawTaskCB) error { panic
(ni()) } | 116 func (tq) AddMulti([]*taskqueue.Task, string, taskqueue.RawTaskCB) error { panic
(ni()) } |
117 func (tq) DeleteMulti([]*taskqueue.Task, string, taskqueue.RawCB) error { panic
(ni()) } | 117 func (tq) DeleteMulti([]*taskqueue.Task, string, taskqueue.RawCB) error { panic
(ni()) } |
118 func (tq) Purge(string) error { panic
(ni()) } | 118 func (tq) Purge(string) error { panic
(ni()) } |
119 func (tq) Stats([]string, taskqueue.RawStatsCB) error { panic
(ni()) } | 119 func (tq) Stats([]string, taskqueue.RawStatsCB) error { panic
(ni()) } |
| 120 func (tq) Testable() taskqueue.Testable { panic
(ni()) } |
120 | 121 |
121 var dummyTQInst = tq{} | 122 var dummyTQInst = tq{} |
122 | 123 |
123 // TaskQueue returns a dummy taskqueue.RawInterface implementation suitable for | 124 // TaskQueue returns a dummy taskqueue.RawInterface implementation suitable for |
124 // embedding. Every method panics with a message containing the name of the | 125 // embedding. Every method panics with a message containing the name of the |
125 // method which was unimplemented. | 126 // method which was unimplemented. |
126 func TaskQueue() taskqueue.RawInterface { return dummyTQInst } | 127 func TaskQueue() taskqueue.RawInterface { return dummyTQInst } |
127 | 128 |
128 /////////////////////////////////// i //////////////////////////////////// | 129 /////////////////////////////////// i //////////////////////////////////// |
129 | 130 |
(...skipping 18 matching lines...) Expand all Loading... |
148 func (i) IsCapabilityDisabled(err error) bool
{ panic(ni()) } | 149 func (i) IsCapabilityDisabled(err error) bool
{ panic(ni()) } |
149 func (i) IsOverQuota(err error) bool
{ panic(ni()) } | 150 func (i) IsOverQuota(err error) bool
{ panic(ni()) } |
150 func (i) IsTimeoutError(err error) bool
{ panic(ni()) } | 151 func (i) IsTimeoutError(err error) bool
{ panic(ni()) } |
151 | 152 |
152 var dummyInfoInst = i{} | 153 var dummyInfoInst = i{} |
153 | 154 |
154 // Info returns a dummy info.Interface implementation suitable for embedding. | 155 // Info returns a dummy info.Interface implementation suitable for embedding. |
155 // Every method panics with a message containing the name of the method which | 156 // Every method panics with a message containing the name of the method which |
156 // was unimplemented. | 157 // was unimplemented. |
157 func Info() info.Interface { return dummyInfoInst } | 158 func Info() info.Interface { return dummyInfoInst } |
OLD | NEW |