MCPcopy Create free account
hub / github.com/DoNewsCode/core / SyncDispatcher

Struct SyncDispatcher

events/dispatcher.go:18–21  ·  view source on GitHub ↗

SyncDispatcher is a contract.Dispatcher implementation that dispatches events synchronously. SyncDispatcher is safe for concurrent use.

Source from the content-addressed store, hash-verified

16// SyncDispatcher is a contract.Dispatcher implementation that dispatches events synchronously.
17// SyncDispatcher is safe for concurrent use.
18type SyncDispatcher struct {
19 registry map[interface{}][]contract.Listener
20 rwLock sync.RWMutex
21}
22
23// Dispatch dispatches events synchronously. If any listener returns an error,
24// abort the process immediately and return that error to caller.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected