1
1
mirror of https://github.com/urbit/shrub.git synced 2024-12-27 06:02:27 +03:00

link-store: support "all unseen" scry

Instead of forcing clients to scry at every path, they can now scry for
all paths at once.
This commit is contained in:
Fang 2020-02-14 01:57:58 +01:00
parent fafe4cf2bd
commit 1f4a41e550
No known key found for this signature in database
GPG Key ID: EB035760C1BBA972

View File

@ -40,6 +40,10 @@
::
:: scry-only paths:
::
::
:: (map path (set url))
:: /unseen the ones we haven't seen yet
::
:: (set url)
:: /unseen/some-path the ones we haven't seen here yet
::
@ -154,6 +158,9 @@
::
[%x %seen @ ^]
``noun+!>((is-seen:do t.t.path))
::
[%x %unseen ~]
``noun+!>(get-all-unseen:do)
::
[%x %unseen ^]
``noun+!>((get-unseen:do t.t.path))
@ -382,6 +389,12 @@
%+ ~(put by *(map ^path submissions)) path
submissions:(~(gut by by-group) path *links)
::
++ get-all-unseen
^- (jug path url)
%- ~(rut by by-group)
|= [=path *]
(get-unseen path)
::
++ get-unseen
|= =path
^- (set url)