gossipmonger-memory-storage

In-memory storage engine for Gossipmonger

gossipmonger-memory-storage

Stability: 1 - Experimental

An in-memory storage engine for Gossipmonger (an implementation of the Scuttlebutt gossip protocol endpoint for real-time peer-to-peer replication).

var GossipmongerMemoryStorage = require('gossipmonger-memory-storage');
var storage = new GossipmongerMemoryStorage();
 
var deadPeers = storage.deadPeers();
var livePeers = storage.livePeers();
 
storage.put("foo", somePeerFoo);
var peerFoo = storage.get("foo");
npm test

Minimalistic default in-memory storage engine for Gossipmonger.

Public API

Creates a new MemoryStorage instance.

  • Return: Array An array of peers that are dead (peer.live != true).
  • id: String Id of peer to get.
  • Return: Object Peer with given id or .
  • Return: Array An array of peers that are live (peer.live == true).
  • id: String Id of peer to put.
  • peer: Object Peer to put into storage.