MCPcopy Index your code
hub / github.com/coder/coder / TemplateWorkspaceOwners

Method TemplateWorkspaceOwners

coderd/metricscache/metricscache.go:263–276  ·  view source on GitHub ↗
(id uuid.UUID)

Source from the content-addressed store, hash-verified

261}
262
263func (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
278func (c *Cache) DeploymentStats() (codersdk.DeploymentStats, bool) {
279 deploymentStats := c.deploymentStatsResponse.Load()

Callers 2

convertTemplateMethod · 0.80

Calls 1

LoadMethod · 0.45

Tested by 1