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

Method InsertHeartbeatUsageEvent

coderd/usage/inserter.go:31–31  ·  view source on GitHub ↗

InsertHeartbeatUsageEvent writes a heartbeat usage event to the database within the given transaction. The caller context must be authorized to create usage events in the database. The `id` should be a stable identifier for the event. Heartbeat events may be emitted by multiple replicas of the sam

(ctx context.Context, tx database.Store, id string, event usagetypes.HeartbeatEvent)

Source from the content-addressed store, hash-verified

29 // Inserts with the same `id` must be idempotent. The database enforces this by
30 // ignoring duplicate records.
31 InsertHeartbeatUsageEvent(ctx context.Context, tx database.Store, id string, event usagetypes.HeartbeatEvent) error
32}
33
34// AGPLInserter is a no-op implementation of Inserter.

Callers 1

runMethod · 0.65

Implementers 3

UsageInsertercoderd/coderdtest/usage.go
AGPLInsertercoderd/usage/inserter.go
dbInserterenterprise/coderd/usage/inserter.go

Calls

no outgoing calls

Tested by

no test coverage detected