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

Method Report

coderd/workspaceagents_test.go:3307–3318  ·  view source on GitHub ↗

Report implements the telemetry.Reporter interface by sending the snapshot to the snapshots channel.

(snapshot *telemetry.Snapshot)

Source from the content-addressed store, hash-verified

3305// Report implements the telemetry.Reporter interface by sending the snapshot
3306// to the snapshots channel.
3307func (f *fakeTelemetryReporter) Report(snapshot *telemetry.Snapshot) {
3308 if !f.enabled {
3309 return
3310 }
3311
3312 select {
3313 case f.snapshots <- snapshot:
3314 // Successfully sent
3315 case <-f.ctx.Done():
3316 f.t.Error("context closed while writing snapshot")
3317 }
3318}
3319
3320// Enabled implements the telemetry.Reporter interface.
3321func (f *fakeTelemetryReporter) Enabled() bool {

Callers

nothing calls this directly

Calls 2

DoneMethod · 0.45
ErrorMethod · 0.45

Tested by

no test coverage detected