git ssb

10+

Matt McKegg / patchwork



Tree: 0fea233fca9208a686f53687dc39b14b3215c371

Files: 0fea233fca9208a686f53687dc39b14b3215c371 / sbot / index.js

1510 bytesRaw
1var Channels = require('./channels')
2var Heartbeat = require('./heartbeat')
3var Subscriptions = require('./subscriptions')
4var Roots = require('./roots')
5var Progress = require('./progress')
6var Search = require('./search')
7var RecentFeeds = require('./recent-feeds')
8var LiveBacklinks = require('./live-backlinks')
9var Hops = require('./hops')
10
11exports.name = 'patchwork'
12exports.version = require('../package.json').version
13exports.manifest = {
14 channels: 'source',
15 subscriptions: 'source',
16 roots: 'source',
17 latest: 'source',
18 linearSearch: 'source',
19 progress: 'source',
20 recentFeeds: 'source',
21 heartbeat: 'source',
22
23 getSubscriptions: 'async',
24 getChannels: 'async',
25 getHops: 'async',
26
27 liveBacklinks: {
28 subscribe: 'sync',
29 unsubscribe: 'sync',
30 stream: 'source'
31 }
32}
33
34exports.init = function (ssb, config) {
35 var progress = Progress(ssb, config)
36 var channels = Channels(ssb, config)
37 var subscriptions = Subscriptions(ssb, config)
38 var roots = Roots(ssb, config)
39 var search = Search(ssb, config)
40 var recentFeeds = RecentFeeds(ssb, config)
41
42 return {
43 heartbeat: Heartbeat(ssb, config),
44 channels: channels.stream,
45 subscriptions: subscriptions.stream,
46 roots: roots.read,
47 latest: roots.latest,
48 progress: progress.stream,
49 recentFeeds: recentFeeds.stream,
50 linearSearch: search.linear,
51 getSubscriptions: subscriptions.get,
52 getChannels: channels.get,
53 liveBacklinks: LiveBacklinks(ssb, config),
54 getHops: Hops(ssb, config)
55 }
56}
57

Built with git-ssb-web