git ssb

0+

mixmix / flume-intro



Tree: 1b92defc7a364a894997eabdeefb6b94f0c1230b

Files: 1b92defc7a364a894997eabdeefb6b94f0c1230b / 2_read_from_flume.js

430 bytesRaw
1const Flume = require('flumedb')
2const FlumeLog = require('flumelog-offset')
3const codec = require('flumecodec')
4const FlumeView = require('flumeview-reduce')
5
6const pull = require('pull-stream')
7
8const log = FlumeLog('demo_log', { codec: codec.json })
9const db = Flume(log)
10
11db.get(62, console.log)
12
13pull(
14 db.stream(), // source
15 pull.map(msg => msg.value.message),
16 pull.drain(msg => { // sink
17 console.log(msg)
18 })
19)
20
21
22

Built with git-ssb-web