mirror of
https://github.com/logos-messaging/nim-ffi.git
synced 2026-08-24 22:51:11 +00:00
This commit is contained in:
+24
-23
@@ -1,4 +1,4 @@
|
||||
; CDDL schema for `timer` — auto-generated from ../timer.nim
|
||||
; CDDL schema for `my_timer` — auto-generated from ../timer.nim
|
||||
; Wire format: CBOR (RFC 8949). Errors return raw UTF-8 (not CBOR) and
|
||||
; are intentionally absent from this schema.
|
||||
|
||||
@@ -8,38 +8,39 @@ EchoRequest = { message: tstr, delayMs: int }
|
||||
EchoResponse = { echoed: tstr, timerName: tstr }
|
||||
ComplexRequest = { messages: [* EchoRequest], tags: [* tstr], note: tstr / nil, retries: int / nil }
|
||||
ComplexResponse = { summary: tstr, itemCount: int, hasNote: bool }
|
||||
EchoEvent = { message: tstr, echoCount: int }
|
||||
JobSpec = { name: tstr, payload: [* tstr], priority: int }
|
||||
RetryPolicy = { maxAttempts: int, backoffMs: int, retryOn: [* tstr] }
|
||||
ScheduleConfig = { startAtMs: int, intervalMs: int, jitter: int / nil }
|
||||
ScheduleResult = { jobId: tstr, willRunCount: int, firstRunAtMs: int, effectiveBackoffMs: int }
|
||||
|
||||
; ─── Request envelopes (one CBOR blob per request) ────────────────
|
||||
TimerCreateCtorReq = { config: TimerConfig }
|
||||
TimerEchoReq = { req: EchoRequest }
|
||||
TimerVersionReq = { }
|
||||
TimerComplexReq = { req: ComplexRequest }
|
||||
TimerScheduleReq = { job: JobSpec, retry: RetryPolicy, schedule: ScheduleConfig }
|
||||
MyTimerCreateCtorReq = { config: TimerConfig }
|
||||
MyTimerEchoReq = { req: EchoRequest }
|
||||
MyTimerVersionReq = { }
|
||||
MyTimerComplexReq = { req: ComplexRequest }
|
||||
MyTimerScheduleReq = { job: JobSpec, retry: RetryPolicy, schedule: ScheduleConfig }
|
||||
|
||||
; ─── Procs ─────────────────────────────────────────────────────────
|
||||
; timer_create (ctor)
|
||||
timer_create-request = TimerCreateCtorReq
|
||||
timer_create-response = tstr
|
||||
; my_timer_create (ctor)
|
||||
my_timer_create-request = MyTimerCreateCtorReq
|
||||
my_timer_create-response = tstr
|
||||
|
||||
; timer_echo (ffi)
|
||||
timer_echo-request = TimerEchoReq
|
||||
timer_echo-response = EchoResponse
|
||||
; my_timer_echo (ffi)
|
||||
my_timer_echo-request = MyTimerEchoReq
|
||||
my_timer_echo-response = EchoResponse
|
||||
|
||||
; timer_version (ffi)
|
||||
timer_version-request = TimerVersionReq
|
||||
timer_version-response = tstr
|
||||
; my_timer_version (ffi)
|
||||
my_timer_version-request = MyTimerVersionReq
|
||||
my_timer_version-response = tstr
|
||||
|
||||
; timer_complex (ffi)
|
||||
timer_complex-request = TimerComplexReq
|
||||
timer_complex-response = ComplexResponse
|
||||
; my_timer_complex (ffi)
|
||||
my_timer_complex-request = MyTimerComplexReq
|
||||
my_timer_complex-response = ComplexResponse
|
||||
|
||||
; timer_schedule (ffi)
|
||||
timer_schedule-request = TimerScheduleReq
|
||||
timer_schedule-response = ScheduleResult
|
||||
; my_timer_schedule (ffi)
|
||||
my_timer_schedule-request = MyTimerScheduleReq
|
||||
my_timer_schedule-response = ScheduleResult
|
||||
|
||||
; timer_destroy (dtor)
|
||||
timer_destroy-response = nil
|
||||
; my_timer_destroy (dtor)
|
||||
my_timer_destroy-response = nil
|
||||
Reference in New Issue
Block a user