MCPcopy Index your code
hub / github.com/buildbot/buildbot / subscribe

Method subscribe

www/data-module/src/data/WebSocketClient.ts:103–113  ·  view source on GitHub ↗
(eventPath: string, subscriber: any)

Source from the content-addressed store, hash-verified

101
102 // High level api. Maintain a list of subscribers for one event path
103 subscribe(eventPath: string, subscriber: any) {
104 const subscribersForPath = this.getSubscribersList(eventPath);
105 subscribersForPath.push(subscriber);
106 if (subscribersForPath.length === 1) {
107 return this.send({
108 cmd: "startConsuming",
109 path: eventPath
110 });
111 }
112 return Promise.resolve();
113 }
114
115 unsubscribe(eventPath: string, collection: any) {
116 const subscribersForPath = this.getSubscribersList(eventPath);

Callers

nothing calls this directly

Calls 4

getSubscribersListMethod · 0.95
sendMethod · 0.95
pushMethod · 0.80
resolveMethod · 0.45

Tested by

no test coverage detected