-
Notifications
You must be signed in to change notification settings - Fork 43
Read only stream? #24
Comments
you could write a scuttlebutt subclass that only accepts changes from the scuttlebutt that has been piped to it, then you can do: A.createStream().pipe(oneWay()).pipe(B.createStream()); |
|
@Raynos oh man, that just made my day :) |
every scuttlebutt would get that, right? then I think that's the better solution. oh, is that already in scuttlebutt? |
every scuttlebutt has |
Both default to |
oh, hmm. that feature was intended for persistance - using it that way will work, okay, I just added a now, you can create a scuttlebutt stream that will emit updates, but not send them, var s1 = master.createStream({writable: false, sendClock: true})
var s2 = slave.createStream({readable: false, sendClock: true}) just added this in scuttlebutt 5.6, update any subclass and you should get that. |
@dominictarr that's excellent, thanks! What does setting the slave stream to |
readable: false tells it not to emit any updates after the vector clock.
|
Is there as way to create a read-only stream between two documents? So if you have document A and B, A stream updates to B but B doesn't send updates to A. Instead B is thought to be read-only.
I've tried to not pipe the B stream back to A but this resulted in B not getting all of the existing state from A:
Is there a way to do this currently?
The text was updated successfully, but these errors were encountered: