mirror of
https://github.com/wicrum-wicrun/sss.git
synced 2024-09-11 18:37:26 +03:00
add +fork
and +copy
This commit is contained in:
parent
fcaf2f50aa
commit
b6b80718a9
@ -257,6 +257,16 @@
|
||||
=. pub-sum (live:du-sum [%sum %foo ~]~)
|
||||
~& > "pub-sum is: {<read:du-sum>}"
|
||||
`this
|
||||
::
|
||||
%fork-log
|
||||
=. pub-log (fork:du-log !<([[%log *] [%log *]] vase))
|
||||
~& > "pub-log is: {<read:du-log>}"
|
||||
`this
|
||||
::
|
||||
%copy-log
|
||||
=. pub-log (copy:du-log sub-log [our dap [%log ~]]:bowl !<([%log *] vase))
|
||||
~& > "pub-log is: {<read:du-log>}"
|
||||
`this
|
||||
::
|
||||
:: This uses `+rule:du` in order to set a new retention policy for a state
|
||||
:: published on a particular path. The arguments here are:
|
||||
|
@ -202,6 +202,7 @@
|
||||
=* rok ((on aeon rock:lake) gte)
|
||||
=* wav ((on aeon wave:lake) lte)
|
||||
|%
|
||||
::
|
||||
++ rule :: Set new retention policy.
|
||||
|= [path=paths =^rule]
|
||||
^- pubs
|
||||
@ -241,6 +242,23 @@
|
||||
?. =(next (add aeon.last waves.rul.tide)) buoy
|
||||
buoy(tid (form tide))
|
||||
::
|
||||
++ fork :: Fork a pub into an empty path.
|
||||
|= [from=paths to=paths]
|
||||
^- pubs
|
||||
:- %0
|
||||
?< (~(has by pub) to)
|
||||
(~(put by pub) to (~(got by pub) from))
|
||||
::
|
||||
++ copy :: Fork a sub into an empty path.
|
||||
|= [sub=_(mk-subs lake *) from=[ship dude *] to=paths]
|
||||
^- pubs
|
||||
:- %0
|
||||
?< (~(has by pub) to)
|
||||
%+ ~(put by pub) to
|
||||
%* . *$<(aeon buoy)
|
||||
rok.tid (put:rok ~ [aeon rock]:(need (~(got by +:sub) from)))
|
||||
==
|
||||
::
|
||||
++ perm :: Change permissions with gate.
|
||||
|= [where=(list paths) diff=$-((unit (set ship)) (unit (set ship)))]
|
||||
^- pubs
|
||||
|
Loading…
Reference in New Issue
Block a user