MCPcopy
hub / github.com/wavetermdev/waveterm / Publish

Method Publish

pkg/wps/wps.go:226–239  ·  view source on GitHub ↗
(event WaveEvent)

Source from the content-addressed store, hash-verified

224}
225
226func (b *BrokerType) Publish(event WaveEvent) {
227 // log.Printf("BrokerType.Publish: %v\n", event)
228 if event.Persist > 0 {
229 b.persistEvent(event)
230 }
231 client := b.GetClient()
232 if client == nil {
233 return
234 }
235 routeIds := b.getMatchingRouteIds(event)
236 for _, routeId := range routeIds {
237 client.SendEvent(routeId, event)
238 }
239}
240
241func (b *BrokerType) SendUpdateEvents(updates waveobj.UpdatesRtnType) {
242 for _, update := range updates {

Callers 15

SendUpdateEventsMethod · 0.95
EventPublishCommandMethod · 0.80
publishRouteToBrokerMethod · 0.80
unsubscribeFromBrokerMethod · 0.80
FireConnChangeEventMethod · 0.80
FireConnChangeEventMethod · 0.80
broadcastMethod · 0.80
UpdateWorkspaceMethod · 0.80
UpdateObjectMethod · 0.80
publishStatusMethod · 0.80
publishOutputLineMethod · 0.80
SendBlockJobStatusEventFunction · 0.80

Calls 4

persistEventMethod · 0.95
GetClientMethod · 0.95
getMatchingRouteIdsMethod · 0.95
SendEventMethod · 0.65

Tested by

no test coverage detected