Use new relays interface

This commit is contained in:
Emery Hemingway 2024-02-05 22:59:45 +01:00
parent f072525dd4
commit 89f23f14f5
6 changed files with 9 additions and 6 deletions

View File

@ -10,10 +10,11 @@ proc main =
data = map(commandLineParams(), parsePreserves)
discard bootDataspace("msg") do (turn: var Turn; root: Cap):
spawnRelays(turn, root)
resolve(turn, root, route) do (turn: var Turn; ds: Cap):
for e in data:
message(turn, ds, e)
for _ in 1..4: poll()
for _ in 1..2: poll()
main()

View File

@ -49,7 +49,7 @@ type
CacheArgumentsField0* {.preservesDictionary.} = object
`dataspace`* {.preservesEmbedded.}: EmbeddedRef
`lifetime`*: float32
`lifetime`*: BiggestFloat
CacheArguments* {.preservesRecord: "cache".} = object
`field0`*: CacheArgumentsField0

View File

@ -5,9 +5,9 @@ import
type
RoundTripTime* {.preservesRecord: "rtt".} = object
`address`*: string
`minimum`*: float32
`average`*: float32
`maximum`*: float32
`minimum`*: BiggestFloat
`average`*: BiggestFloat
`maximum`*: BiggestFloat
proc `$`*(x: RoundTripTime): string =
`$`(toPreserves(x))

View File

@ -126,6 +126,7 @@ proc main =
else:
let entity = DumpEntity()
runActor("syndex_card") do (root: Cap; turn: var Turn):
spawnRelays(turn, root)
resolve(turn, root, route) do (turn: var Turn; ds: Cap):
discard observe(turn, ds, pat, entity)

View File

@ -64,6 +64,7 @@ proc main =
runActor("syndex_card") do (root: Cap; turn: var Turn):
for pat in patterns:
discard observe(turn, root, pat, entity)
spawnRelays(turn, root)
resolve(turn, root, route) do (turn: var Turn; ds: Cap):
for pat in patterns:
discard observe(turn, ds, pat, entity)

View File

@ -1,6 +1,6 @@
# Package
version = "20240120"
version = "20240205"
author = "Emery Hemingway"
description = "Utilites for Syndicated Actors and Synit"
license = "unlicense"