Method
constructor
({
pluginId,
debug = false,
enabled = true,
reconnectEveryMs = 300,
}: {
pluginId: string
debug?: boolean
reconnectEveryMs?: number
enabled?: boolean
})
Source from the content-addressed store, hash-verified
| 61 | } |
| 62 | |
| 63 | constructor({ |
| 64 | pluginId, |
| 65 | debug = false, |
| 66 | enabled = true, |
| 67 | reconnectEveryMs = 300, |
| 68 | }: { |
| 69 | pluginId: string |
| 70 | debug?: boolean |
| 71 | reconnectEveryMs?: number |
| 72 | enabled?: boolean |
| 73 | }) { |
| 74 | this.#pluginId = pluginId |
| 75 | this.#enabled = enabled |
| 76 | this.#eventTarget = this.getGlobalTarget |
| 77 | this.#debug = debug |
| 78 | this.debugLog(' Initializing event subscription for plugin', this.#pluginId) |
| 79 | this.#queuedEvents = [] |
| 80 | this.#connected = false |
| 81 | this.#failedToConnect = false |
| 82 | this.#connectIntervalId = null |
| 83 | this.#connectEveryMs = reconnectEveryMs |
| 84 | } |
| 85 | |
| 86 | private startConnectLoop() { |
| 87 | // if connected, trying to connect, or the internalId is already set, do nothing |
Callers
nothing calls this directly
Tested by
no test coverage detected