OLD | NEW |
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 memory | 5 package memory |
6 | 6 |
7 import ( | 7 import ( |
8 "fmt" | 8 "fmt" |
9 "regexp" | 9 "regexp" |
10 | 10 |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 } | 99 } |
100 | 100 |
101 func (gi *giImpl) AppID() string { | 101 func (gi *giImpl) AppID() string { |
102 return gi.appID | 102 return gi.appID |
103 } | 103 } |
104 | 104 |
105 func (gi *giImpl) FullyQualifiedAppID() string { | 105 func (gi *giImpl) FullyQualifiedAppID() string { |
106 return gi.fqAppID | 106 return gi.fqAppID |
107 } | 107 } |
108 | 108 |
| 109 func (gi *giImpl) DefaultVersionHostname() string { |
| 110 return fmt.Sprintf("%s.example.com", gi.appID) |
| 111 } |
| 112 |
109 func (gi *giImpl) IsDevAppServer() bool { | 113 func (gi *giImpl) IsDevAppServer() bool { |
110 return true | 114 return true |
111 } | 115 } |
112 | 116 |
113 func (gi *giImpl) VersionID() string { | 117 func (gi *giImpl) VersionID() string { |
114 return curGID(gi.c).versionID | 118 return curGID(gi.c).versionID |
115 } | 119 } |
116 | 120 |
117 func (gi *giImpl) RequestID() string { | 121 func (gi *giImpl) RequestID() string { |
118 return curGID(gi.c).requestID | 122 return curGID(gi.c).requestID |
119 } | 123 } |
120 | 124 |
121 func (gi *giImpl) Testable() info.Testable { | 125 func (gi *giImpl) Testable() info.Testable { |
122 return gi | 126 return gi |
123 } | 127 } |
124 | 128 |
125 func (gi *giImpl) SetVersionID(v string) context.Context { | 129 func (gi *giImpl) SetVersionID(v string) context.Context { |
126 return useGID(gi.c, func(mod *globalInfoData) { | 130 return useGID(gi.c, func(mod *globalInfoData) { |
127 mod.versionID = v | 131 mod.versionID = v |
128 }) | 132 }) |
129 } | 133 } |
130 | 134 |
131 func (gi *giImpl) SetRequestID(v string) context.Context { | 135 func (gi *giImpl) SetRequestID(v string) context.Context { |
132 return useGID(gi.c, func(mod *globalInfoData) { | 136 return useGID(gi.c, func(mod *globalInfoData) { |
133 mod.requestID = v | 137 mod.requestID = v |
134 }) | 138 }) |
135 } | 139 } |
OLD | NEW |