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

Struct StatsAPI

coderd/agentapi/stats.go:19–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17)
18
19type StatsAPI struct {
20 AgentID uuid.UUID
21 AgentName string
22 Workspace *CachedWorkspaceFields
23 Database database.Store
24 Log slog.Logger
25 StatsReporter *workspacestats.Reporter
26 AgentStatsRefreshInterval time.Duration
27 Experiments codersdk.Experiments
28
29 TimeNowFn func() time.Time // defaults to dbtime.Now()
30}
31
32func (a *StatsAPI) now() time.Time {
33 if a.TimeNowFn != nil {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected