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

Function WorkspaceEventChannel

coderd/wspubsub/wspubsub.go:53–55  ·  view source on GitHub ↗

WorkspaceEventChannel can be used to subscribe to events for workspaces owned by the provided user ID.

(ownerID uuid.UUID)

Source from the content-addressed store, hash-verified

51// WorkspaceEventChannel can be used to subscribe to events for
52// workspaces owned by the provided user ID.
53func WorkspaceEventChannel(ownerID uuid.UUID) string {
54 return fmt.Sprintf("workspace_owner:%s", ownerID)
55}
56
57func HandleWorkspaceEvent(cb func(ctx context.Context, payload WorkspaceEvent, err error)) func(ctx context.Context, message []byte, err error) {
58 return func(ctx context.Context, message []byte, err error) {

Callers 15

publishWorkspaceEventFunction · 0.92
startMethod · 0.92
watchWorkspaceMethod · 0.92
workspaceAgentLogsMethod · 0.92
doInTXMethod · 0.92
ReportAgentStatsMethod · 0.92
TestUpdateStatsFunction · 0.92
acquireProtoJobMethod · 0.92
FailJobMethod · 0.92
TestAcquireJobFunction · 0.92

Calls

no outgoing calls

Tested by 6

publishWorkspaceEventFunction · 0.74
TestUpdateStatsFunction · 0.74
TestAcquireJobFunction · 0.74
TestFailJobFunction · 0.74
TestCompleteJobFunction · 0.74