MemoryPubsub is an in-memory Pubsub implementation. It's an exported type so that our test code can do type checks.
| 25 | // MemoryPubsub is an in-memory Pubsub implementation. It's an exported type so that our test code can do type |
| 26 | // checks. |
| 27 | type MemoryPubsub struct { |
| 28 | mut sync.RWMutex |
| 29 | listeners map[string]map[uuid.UUID]genericListener |
| 30 | } |
| 31 | |
| 32 | func (m *MemoryPubsub) Subscribe(event string, listener Listener) (cancel func(), err error) { |
| 33 | return m.subscribeGeneric(event, genericListener{l: listener}) |
nothing calls this directly
no outgoing calls
no test coverage detected