ssbc/ssb-server-channel

Name: ssb-server-channel

Owner: Secure Scuttlebutt Consortium

Description: null

Created: 2018-01-31 00:29:53.0

Updated: 2018-01-31 02:56:56.0

Pushed: 2018-02-15 03:01:51.0

Homepage: null

Size: 16

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

ssb-server-channel

Usage
t Server = require('scuttlebot')
t config = { ... } // needs options

nstall the plugin
er
se(require('scuttlebot/plugins/master')) // required
se(require('ssb-server-channel'))
se(require('ssb-backlinks')) // not required, just an example

tart the server
t server = Server(config)
API
server.channel.subscriptions(cb)

Get the channels and who is subscribed where cb(err, data) is called with data of form:


[FeedId, Timestamp],
[FeedId, Timestamp],


e.g


arning: [
['@gaQw6z...', 1518663315275],
['@ye+QM09...', 1518663311233]

azil: [
['@gaQw6z...', 1518663129468],


server.channel.get(cb)

Get the current state of the channel view. This will wait until the view is up to date, if necessary.

cb(err, data) is a standard callback function where data is of the form:

(same as channel.subscriptions at the moment)

server.channel.stream() => pull-stream source

Be careful, this is a stream which provides:

For details see : https://github.com/flumedb/flumeview-reduce


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.