Update submodules
This commit is contained in:
parent
515ef22805
commit
babc58526c
|
@ -1 +1 @@
|
|||
Subproject commit 29d7352a23be733a9892a55eb1503b3aaed5ab12
|
||||
Subproject commit 1dc7991761ae4debc6094ab1de9ea3520c210c42
|
|
@ -1 +1 @@
|
|||
Subproject commit 6cfd97c91ae15197190ad50c71b8cfcd45da0f6e
|
||||
Subproject commit b42230b96a6f8665fdd8e56a52a5e76072a6d182
|
|
@ -6,6 +6,8 @@ import preserves
|
|||
import syndicate/[actors, dataspaces, patterns]
|
||||
export patterns
|
||||
|
||||
from syndicate/protocols/protocol import Handle
|
||||
|
||||
proc wrapPublishHandler(handler: NimNode): NimNode =
|
||||
handler.expectKind nnkDo
|
||||
var innerProc = newNimNode(nnkProcDef)
|
||||
|
|
|
@ -5,6 +5,8 @@ import std/[asyncdispatch, deques, hashes, monotimes, options, sets, tables, tim
|
|||
import preserves, preserves/parse
|
||||
import ../syndicate/protocols/[protocol, sturdy]
|
||||
|
||||
export Handle
|
||||
|
||||
# proc `==`*(x, y: Handle): bool {.borrow.}
|
||||
|
||||
template generateIdType(T: untyped) =
|
||||
|
|
Binary file not shown.
|
@ -14,7 +14,7 @@ type
|
|||
`pattern`*: Pattern[E]
|
||||
|
||||
DDiscard* {.preservesRecord: "_".} = object
|
||||
|
||||
|
||||
CArr* {.preservesRecord: "arr".} = object
|
||||
`arity`*: int
|
||||
|
||||
|
|
Binary file not shown.
|
@ -25,9 +25,9 @@ type
|
|||
`oid`*: Oid
|
||||
`event`*: Event[E]
|
||||
|
||||
Oid* = BiggestInt
|
||||
Oid* = int
|
||||
Assertion*[E] = Preserve[E]
|
||||
Handle* = BiggestInt
|
||||
Handle* = int
|
||||
PacketKind* {.pure.} = enum
|
||||
`Turn`, `Error`
|
||||
`Packet`*[E] {.preservesOr.} = ref object
|
||||
|
|
|
@ -3,7 +3,7 @@ import
|
|||
std/typetraits, preserves
|
||||
|
||||
type
|
||||
UserId* = BiggestInt
|
||||
UserId* = int
|
||||
NickConflict* {.preservesRecord: "nickConflict".} = object
|
||||
|
||||
NickClaimResponseKind* {.pure.} = enum
|
||||
|
|
|
@ -3,47 +3,37 @@ import
|
|||
std/typetraits, preserves
|
||||
|
||||
type
|
||||
ServiceStarted*[E] {.preservesRecord: "service-started".} = ref object
|
||||
`State`* {.preservesOr.} = enum
|
||||
`started`, `ready`, `failed`, `complete`
|
||||
ServiceObject*[E] {.preservesRecord: "service-object".} = ref object
|
||||
`serviceName`*: Preserve[E]
|
||||
`object`*: Preserve[E]
|
||||
|
||||
ServiceMilestone*[E] {.preservesRecord: "service-milestone".} = ref object
|
||||
CoreService*[E] {.preservesRecord: "core-service".} = ref object
|
||||
`serviceName`*: Preserve[E]
|
||||
`milestone`*: Preserve[E]
|
||||
|
||||
RequireService*[E] {.preservesRecord: "require-service".} = ref object
|
||||
`serviceName`*: Preserve[E]
|
||||
|
||||
DependeeKind* {.pure.} = enum
|
||||
`ServiceStarted`, `ServiceRunning`
|
||||
`Dependee`*[E] {.preservesOr.} = ref object
|
||||
case orKind*: DependeeKind
|
||||
of DependeeKind.`ServiceStarted`:
|
||||
`servicestarted`*: ServiceStarted[E]
|
||||
|
||||
of DependeeKind.`ServiceRunning`:
|
||||
`servicerunning`*: ServiceRunning[E]
|
||||
|
||||
|
||||
RunService*[E] {.preservesRecord: "run-service".} = ref object
|
||||
`serviceName`*: Preserve[E]
|
||||
|
||||
ServiceRunning*[E] {.preservesRecord: "service-running".} = ref object
|
||||
ServiceState*[E] {.preservesRecord: "service-state".} = ref object
|
||||
`serviceName`*: Preserve[E]
|
||||
`state`*: State
|
||||
|
||||
ServiceDependency*[E] {.preservesRecord: "depends-on".} = ref object
|
||||
`depender`*: Preserve[E]
|
||||
`dependee`*: Dependee[E]
|
||||
`dependee`*: ServiceState[E]
|
||||
|
||||
proc `$`*[E](x: ServiceStarted[E] | ServiceMilestone[E] | RequireService[E] |
|
||||
Dependee[E] |
|
||||
proc `$`*[E](x: ServiceObject[E] | CoreService[E] | RequireService[E] |
|
||||
RunService[E] |
|
||||
ServiceRunning[E] |
|
||||
ServiceState[E] |
|
||||
ServiceDependency[E]): string =
|
||||
`$`(toPreserve(x, E))
|
||||
|
||||
proc encode*[E](x: ServiceStarted[E] | ServiceMilestone[E] | RequireService[E] |
|
||||
Dependee[E] |
|
||||
proc encode*[E](x: ServiceObject[E] | CoreService[E] | RequireService[E] |
|
||||
RunService[E] |
|
||||
ServiceRunning[E] |
|
||||
ServiceState[E] |
|
||||
ServiceDependency[E]): seq[byte] =
|
||||
encode(toPreserve(x, E))
|
||||
|
|
|
@ -5,7 +5,7 @@ import
|
|||
type
|
||||
CreditAmountKind* {.pure.} = enum
|
||||
`count`, `unbounded`
|
||||
CreditAmountCount* = BiggestInt
|
||||
CreditAmountCount* = int
|
||||
`CreditAmount`* {.preservesOr.} = object
|
||||
case orKind*: CreditAmountKind
|
||||
of CreditAmountKind.`count`:
|
||||
|
@ -82,7 +82,7 @@ type
|
|||
ModeKind* {.pure.} = enum
|
||||
`bytes`, `lines`, `packet`, `object`
|
||||
ModePacket* {.preservesRecord: "packet".} = object
|
||||
`size`*: BiggestInt
|
||||
`size`*: int
|
||||
|
||||
ModeObject*[E] {.preservesRecord: "object".} = ref object
|
||||
`description`*: Preserve[E]
|
||||
|
|
|
@ -5,7 +5,7 @@ import
|
|||
type
|
||||
CRec*[E] {.preservesRecord: "rec".} = ref object
|
||||
`label`*: Preserve[E]
|
||||
`arity`*: BiggestInt
|
||||
`arity`*: int
|
||||
|
||||
PCompound*[E] {.preservesRecord: "compound".} = ref object
|
||||
`ctor`*: ConstructorSpec[E]
|
||||
|
@ -34,7 +34,7 @@ type
|
|||
|
||||
TCompoundMembers*[E] = Table[Preserve[E], Template[E]]
|
||||
TRef* {.preservesRecord: "ref".} = object
|
||||
`binding`*: BiggestInt
|
||||
`binding`*: int
|
||||
|
||||
PBind*[E] {.preservesRecord: "bind".} = ref object
|
||||
`pattern`*: Pattern[E]
|
||||
|
@ -81,7 +81,7 @@ type
|
|||
|
||||
|
||||
CArr* {.preservesRecord: "arr".} = object
|
||||
`arity`*: BiggestInt
|
||||
`arity`*: int
|
||||
|
||||
PCompoundMembers*[E] = Table[Preserve[E], Pattern[E]]
|
||||
PNot*[E] {.preservesRecord: "not".} = ref object
|
||||
|
@ -116,7 +116,7 @@ type
|
|||
`template`*: Template[E]
|
||||
`attenuation`*: Attenuation[E]
|
||||
|
||||
Oid* = BiggestInt
|
||||
Oid* = int
|
||||
Alts*[E] {.preservesRecord: "or".} = ref object
|
||||
`alternatives`*: seq[Rewrite[E]]
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ import
|
|||
type
|
||||
TcpLocal* {.preservesRecord: "tcp-local".} = object
|
||||
`host`*: string
|
||||
`port`*: BiggestInt
|
||||
`port`*: int
|
||||
|
||||
TcpPeerInfo*[E] {.preservesRecord: "tcp-peer".} = ref object
|
||||
`handle`*: Preserve[E]
|
||||
|
@ -14,7 +14,7 @@ type
|
|||
|
||||
TcpRemote* {.preservesRecord: "tcp-remote".} = object
|
||||
`host`*: string
|
||||
`port`*: BiggestInt
|
||||
`port`*: int
|
||||
|
||||
proc `$`*[E](x: TcpPeerInfo[E]): string =
|
||||
`$`(toPreserve(x, E))
|
||||
|
|
|
@ -13,7 +13,7 @@ type
|
|||
|
||||
Tcp* {.preservesRecord: "tcp".} = object
|
||||
`host`*: string
|
||||
`port`*: BiggestInt
|
||||
`port`*: int
|
||||
|
||||
proc `$`*(x: WebSocket | Stdio | Unix | Tcp): string =
|
||||
`$`(toPreserve(x))
|
||||
|
|
Loading…
Reference in New Issue