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

Function newFakeTelemetryReporter

coderd/workspaceagents_test.go:3296–3303  ·  view source on GitHub ↗

newFakeTelemetryReporter creates a new fakeTelemetryReporter with a buffered channel. The buffer size determines how many snapshots can be reported before blocking.

(ctx context.Context, t testing.TB, bufferSize int)

Source from the content-addressed store, hash-verified

3294// newFakeTelemetryReporter creates a new fakeTelemetryReporter with a buffered channel.
3295// The buffer size determines how many snapshots can be reported before blocking.
3296func newFakeTelemetryReporter(ctx context.Context, t testing.TB, bufferSize int) *fakeTelemetryReporter {
3297 return &fakeTelemetryReporter{
3298 enabled: true,
3299 snapshots: make(chan *telemetry.Snapshot, bufferSize),
3300 ctx: ctx,
3301 t: t,
3302 }
3303}
3304
3305// Report implements the telemetry.Reporter interface by sending the snapshot
3306// to the snapshots channel.

Callers 2

TestUserTailnetTelemetryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected