MCPcopy Create free account
hub / github.com/simstudioai/sim / publish

Method publish

apps/sim/lib/events/pubsub.ts:84–89  ·  view source on GitHub ↗
(event: T)

Source from the content-addressed store, hash-verified

82 }
83
84 publish(event: T): void {
85 if (this.disposed) return
86 this.pub.publish(this.config.channel, JSON.stringify(event)).catch((err) => {
87 logger.error(`Failed to publish to ${this.config.label}:`, err)
88 })
89 }
90
91 subscribe(handler: (event: T) => void): () => void {
92 this.handlers.add(handler)

Callers

nothing calls this directly

Calls 2

errorMethod · 0.80
publishMethod · 0.65

Tested by

no test coverage detected