Method
TemplateWorkspaceOwners
(id uuid.UUID)
Source from the content-addressed store, hash-verified
| 261 | } |
| 262 | |
| 263 | func (c *Cache) TemplateWorkspaceOwners(id uuid.UUID) (int, bool) { |
| 264 | m := c.templateWorkspaceOwners.Load() |
| 265 | if m == nil { |
| 266 | // Data loading. |
| 267 | return -1, false |
| 268 | } |
| 269 | |
| 270 | resp, ok := (*m)[id] |
| 271 | if !ok { |
| 272 | // Probably no data. |
| 273 | return -1, false |
| 274 | } |
| 275 | return resp, true |
| 276 | } |
| 277 | |
| 278 | func (c *Cache) DeploymentStats() (codersdk.DeploymentStats, bool) { |
| 279 | deploymentStats := c.deploymentStatsResponse.Load() |