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

Struct MemoryPubsub

coderd/database/pubsub/pubsub_memory.go:27–30  ·  view source on GitHub ↗

MemoryPubsub is an in-memory Pubsub implementation. It's an exported type so that our test code can do type checks.

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected