| 41 | } |
| 42 | |
| 43 | type sub struct { |
| 44 | // ALways contains an actor |
| 45 | ctx context.Context |
| 46 | cancelFn context.CancelFunc |
| 47 | |
| 48 | mu sync.RWMutex |
| 49 | userID uuid.UUID |
| 50 | ch chan *proto.WorkspaceUpdate |
| 51 | prev workspacesByID |
| 52 | |
| 53 | db UpdatesQuerier |
| 54 | ps pubsub.Pubsub |
| 55 | logger slog.Logger |
| 56 | |
| 57 | psCancelFn func() |
| 58 | } |
| 59 | |
| 60 | func (s *sub) handleEvent(ctx context.Context, event wspubsub.WorkspaceEvent, err error) { |
| 61 | s.mu.Lock() |
no outgoing calls
no test coverage detected