Add exportState and moduleSnapshot helpers across all module categories.
Fifth pass: complete measurement modules (sla-budget, histogram-gossip) with moduleSnapshot/toJSON; stats-exporter exportSnapshot; exportState() alias on modules with standard snapshot serialization. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
@@ -131,6 +131,10 @@ class HyperP2PStreamMultiplex extends EventEmitter {
|
||||
return this.snapshot()
|
||||
}
|
||||
|
||||
exportState () {
|
||||
return this.toJSON()
|
||||
}
|
||||
|
||||
openStreamBatch (ids) {
|
||||
if (!Array.isArray(ids)) throw new Error('ids array required')
|
||||
return ids.map((id) => this.openStream(id))
|
||||
|
||||
Reference in New Issue
Block a user