Home

Awesome

gossipmonger-memory-storage

Stability: 1 - Experimental

NPM version

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

Usage

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");

Tests

npm test

Overview

Minimalistic default in-memory storage engine for Gossipmonger.

Documentation

MemoryStorage

Public API

new MemoryStorage()

Creates a new MemoryStorage instance.

memoryStorage.deadPeers()

memoryStorage.get(id)

memoryStorage.livePeers()

memoryStorage.put(id, peer)