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

Method GetPrebuildMetrics

coderd/database/dbauthz/dbauthz.go:3930–3937  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

3928}
3929
3930func (q *querier) GetPrebuildMetrics(ctx context.Context) ([]database.GetPrebuildMetricsRow, error) {
3931 // GetPrebuildMetrics returns metrics related to prebuilt workspaces,
3932 // such as the number of created and failed prebuilt workspaces.
3933 if err := q.authorizeContext(ctx, policy.ActionRead, rbac.ResourceWorkspace.All()); err != nil {
3934 return nil, err
3935 }
3936 return q.db.GetPrebuildMetrics(ctx)
3937}
3938
3939func (q *querier) GetPrebuildsSettings(ctx context.Context) (string, error) {
3940 return q.db.GetPrebuildsSettings(ctx)

Callers

nothing calls this directly

Calls 3

authorizeContextMethod · 0.95
AllMethod · 0.80
GetPrebuildMetricsMethod · 0.65

Tested by

no test coverage detected