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 info | 5 package info |
6 | 6 |
7 import ( | 7 import ( |
8 "time" | 8 "time" |
9 | 9 |
10 "golang.org/x/net/context" | 10 "golang.org/x/net/context" |
11 ) | 11 ) |
12 | 12 |
13 // Interface is the interface for all of the package methods which normally | 13 // Interface is the interface for all of the package methods which normally |
14 // would be in the 'appengine' package. | 14 // would be in the 'appengine' package. |
15 type Interface interface { | 15 type Interface interface { |
16 AppID() string | 16 AppID() string |
17 FullyQualifiedAppID() string | 17 FullyQualifiedAppID() string |
18 » GetNamespace() string | 18 » GetNamespace() (string, bool) |
19 | 19 |
20 Datacenter() string | 20 Datacenter() string |
21 DefaultVersionHostname() string | 21 DefaultVersionHostname() string |
22 InstanceID() string | 22 InstanceID() string |
23 IsDevAppServer() bool | 23 IsDevAppServer() bool |
24 IsOverQuota(err error) bool | 24 IsOverQuota(err error) bool |
25 IsTimeoutError(err error) bool | 25 IsTimeoutError(err error) bool |
26 ModuleHostname(module, version, instance string) (string, error) | 26 ModuleHostname(module, version, instance string) (string, error) |
27 ModuleName() string | 27 ModuleName() string |
28 RequestID() string | 28 RequestID() string |
(...skipping 11 matching lines...) Expand all Loading... |
40 // Testable returns this Interface's Testable interface. Testing will re
turn | 40 // Testable returns this Interface's Testable interface. Testing will re
turn |
41 // nil if testing is not supported in this implementation. | 41 // nil if testing is not supported in this implementation. |
42 Testable() Testable | 42 Testable() Testable |
43 } | 43 } |
44 | 44 |
45 // Testable is an additional set of functions for testing instrumentation. | 45 // Testable is an additional set of functions for testing instrumentation. |
46 type Testable interface { | 46 type Testable interface { |
47 SetVersionID(string) context.Context | 47 SetVersionID(string) context.Context |
48 SetRequestID(string) context.Context | 48 SetRequestID(string) context.Context |
49 } | 49 } |
OLD | NEW |