You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A method which provides convenient lookup for arbitrary keys. If
177
174
`Gossip.state` has no entry for a given key, this method returns
178
175
`{version: -Infinity, value: null}`. Otherwise it returns `{version: version,
179
176
value: value}`
180
177
181
-
###`Gossip.gossip() -> null`###
178
+
###`Gossip.gossip() -> null`###
182
179
183
180
Causes `Gossip` to queue a randomly sorted set of `digest` objects into its
184
181
Readable buffer. If another `Gossip` stream reads these, it will respond
@@ -192,18 +189,18 @@ returns false.
192
189
193
190
## Attributes ##
194
191
195
-
###`Gossip.state`###
192
+
###`Gossip.state`###
196
193
As specified in the [paper][], state is a
197
194
key-value map (modeled as a native javascript object), available in the
198
195
`.state` attribute of a `Gossip` instance. Each key maps to a value and a
199
196
version number, so `state[key]` -> `{version: version, value: value}`
200
197
201
-
###`Gossip.version`###
198
+
###`Gossip.version`###
202
199
203
200
The highest version number the `Gossip` instance has seen (both locally and
204
201
from other instances)
205
202
206
-
###`Gossip.history`###
203
+
###`Gossip.history`###
207
204
208
205
An object for keeping track of updates, and replaying updates from a given peer
209
206
on demand. `update` objects are transmitted individually via the `Gossip`'s
@@ -217,7 +214,7 @@ with the [`update`](#update) to be applied.
217
214
218
215
-`"compaction"`: If the number of updates recorded in the history exceeds the `max_history` parameter, the `"compaction"` event is emitted prior to removing old updates from the history. This way the client can implement more dramatic compaction, making their own tradeoffs between performance, replayability, and speed.
0 commit comments