WorkspaceEventChannel can be used to subscribe to events for workspaces owned by the provided user ID.
(ownerID uuid.UUID)
| 51 | // WorkspaceEventChannel can be used to subscribe to events for |
| 52 | // workspaces owned by the provided user ID. |
| 53 | func WorkspaceEventChannel(ownerID uuid.UUID) string { |
| 54 | return fmt.Sprintf("workspace_owner:%s", ownerID) |
| 55 | } |
| 56 | |
| 57 | func 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) { |
no outgoing calls