feat(ws): metrics (#9005)

* feat(WebSocketManager): fetch status

* feat(WebSocketShard): heartbeat event

* chore: ci

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
DD
2023-01-06 14:00:47 +02:00
committed by GitHub
parent e8b7504352
commit 0ff67d8e7a
7 changed files with 104 additions and 20 deletions

View File

@@ -70,4 +70,11 @@ export class SimpleShardingStrategy implements IShardingStrategy {
if (!shard) throw new Error(`Shard ${shardId} not found`);
return shard.send(payload);
}
/**
* {@inheritDoc IShardingStrategy.fetchStatus}
*/
public async fetchStatus() {
return this.shards.mapValues((shard) => shard.status);
}
}