Skip to content

Commit 959e526

Browse files
committed
fix some markdown
1 parent 6bc90aa commit 959e526

File tree

1 file changed

+10
-13
lines changed

1 file changed

+10
-13
lines changed

README.md

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44

55
Replicate state across a network with the scuttlebutt protocol.
66

7-
[![Build
8-
Status](https://travis-ci.org/AWinterman/simple-scuttle.png?branch=master)](https://travis-ci.org/AWinterman/simple-scuttle)
9-
107
I recommend you at least skim the [paper][] which describes the
118
protocol before continuing too much further.
129

@@ -107,7 +104,7 @@ that is not on Object.prototype) will be written to history.
107104
Gossip instances expect objects written to them (with `gossip.write`) to either
108105
be `digest`s or `updates`s.
109106

110-
####digests####
107+
#### digests ####
111108

112109
```js
113110
var digest
@@ -137,7 +134,7 @@ peers it knows about that have version number greater than the version in the
137134
digest. They will be ordered according to `config.sort`, (updated each time
138135
history is updated).
139136

140-
####updates####
137+
#### updates ####
141138
The other kind of object, the update, is an object that appears like the
142139
following:
143140

@@ -163,22 +160,22 @@ Streams](http://nodejs.org/api/stream.html#stream_class_stream_transform_1), so
163160
they implement all of the methods and events as described in the node core
164161
documentation. In addition, there are a few methods specific to this purpose:
165162

166-
###`Gossip.set(key, value) -> Boolean`###
163+
### `Gossip.set(key, value) -> Boolean` ###
167164

168165
This method applies a local update, simply setting the given key to the given
169166
value in the local instance, and tacking on the appropriate `version` number and
170167
`source_id`. It's return value indicates whether the underlying stream has hit
171168
its high water mark. If the return value is `false`, do not write until
172169
`Gossip` has emitted a `"drain"` event.
173170

174-
###`Gossip.get(key) -> {version: <version>, value: <obj>} `###
171+
### ` Gossip.get(key) -> {version: <version>, value: <obj>}` ###
175172

176173
A method which provides convenient lookup for arbitrary keys. If
177174
`Gossip.state` has no entry for a given key, this method returns
178175
`{version: -Infinity, value: null}`. Otherwise it returns `{version: version,
179176
value: value}`
180177

181-
###`Gossip.gossip() -> null`###
178+
### `Gossip.gossip() -> null` ###
182179

183180
Causes `Gossip` to queue a randomly sorted set of `digest` objects into its
184181
Readable buffer. If another `Gossip` stream reads these, it will respond
@@ -192,18 +189,18 @@ returns false.
192189

193190
## Attributes ##
194191

195-
###`Gossip.state`###
192+
### `Gossip.state` ###
196193
As specified in the [paper][], state is a
197194
key-value map (modeled as a native javascript object), available in the
198195
`.state` attribute of a `Gossip` instance. Each key maps to a value and a
199196
version number, so `state[key]` -> `{version: version, value: value}`
200197

201-
###`Gossip.version`###
198+
### `Gossip.version` ###
202199

203200
The highest version number the `Gossip` instance has seen (both locally and
204201
from other instances)
205202

206-
###`Gossip.history`###
203+
### `Gossip.history` ###
207204

208205
An object for keeping track of updates, and replaying updates from a given peer
209206
on demand. `update` objects are transmitted individually via the `Gossip`'s
@@ -217,7 +214,7 @@ with the [`update`](#update) to be applied.
217214

218215
- `"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.
219216

220-
####`Gossip.history.write(key, value, source_id, version)`####
217+
#### `Gossip.history.write(key, value, source_id, version)` ####
221218

222219
Write a new update to the history. The update is recorded into
223220
`Gossip.history.memory`, an array of updates, which is then sorted via `sort`
@@ -226,7 +223,7 @@ event is emitted with the update as its argument. This event is emitted to allow
226223
the client to take action prior to pruning the `memory` array to
227224
`max_history`'s length.
228225

229-
####`Gossip.history.news(id, version)` -> [`Array updates`](#updates)####
226+
#### `Gossip.history.news(id, version)` -> [`Array updates`](#updates) ####
230227

231228
Returns an array of `update`s which came from a source with unique identifier
232229
matching `id`, and which occurred after `version`.

0 commit comments

Comments
 (0)