mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-08-26 16:01:17 +00:00
feat: add LogosDelivery orchestrator as project entry point for FFI (#3970)
This commit is contained in:
@@ -22,32 +22,32 @@ proc getMetrics(): string =
|
||||
return defaultRegistry.toText() ## defaultRegistry is {.global.} in metrics module
|
||||
|
||||
proc waku_version(
|
||||
ctx: ptr FFIContext[Waku], callback: FFICallBack, userData: pointer
|
||||
ctx: ptr FFIContext[LogosDelivery], callback: FFICallBack, userData: pointer
|
||||
) {.ffi.} =
|
||||
return ok(WakuNodeVersionString)
|
||||
|
||||
proc waku_listen_addresses(
|
||||
ctx: ptr FFIContext[Waku], callback: FFICallBack, userData: pointer
|
||||
ctx: ptr FFIContext[LogosDelivery], callback: FFICallBack, userData: pointer
|
||||
) {.ffi.} =
|
||||
## returns a comma-separated string of the listen addresses
|
||||
return ok(ctx.myLib[].node.getMultiaddresses().join(","))
|
||||
return ok(ctx.myLib[].waku.node.getMultiaddresses().join(","))
|
||||
|
||||
proc waku_get_my_enr(
|
||||
ctx: ptr FFIContext[Waku], callback: FFICallBack, userData: pointer
|
||||
ctx: ptr FFIContext[LogosDelivery], callback: FFICallBack, userData: pointer
|
||||
) {.ffi.} =
|
||||
return ok(ctx.myLib[].node.enr.toURI())
|
||||
return ok(ctx.myLib[].waku.node.enr.toURI())
|
||||
|
||||
proc waku_get_my_peerid(
|
||||
ctx: ptr FFIContext[Waku], callback: FFICallBack, userData: pointer
|
||||
ctx: ptr FFIContext[LogosDelivery], callback: FFICallBack, userData: pointer
|
||||
) {.ffi.} =
|
||||
return ok($ctx.myLib[].node.peerId())
|
||||
return ok($ctx.myLib[].waku.node.peerId())
|
||||
|
||||
proc waku_get_metrics(
|
||||
ctx: ptr FFIContext[Waku], callback: FFICallBack, userData: pointer
|
||||
ctx: ptr FFIContext[LogosDelivery], callback: FFICallBack, userData: pointer
|
||||
) {.ffi.} =
|
||||
return ok(getMetrics())
|
||||
|
||||
proc waku_is_online(
|
||||
ctx: ptr FFIContext[Waku], callback: FFICallBack, userData: pointer
|
||||
ctx: ptr FFIContext[LogosDelivery], callback: FFICallBack, userData: pointer
|
||||
) {.ffi.} =
|
||||
return ok($ctx.myLib[].healthMonitor.onlineMonitor.amIOnline())
|
||||
return ok($ctx.myLib[].waku.healthMonitor.onlineMonitor.amIOnline())
|
||||
|
||||
Reference in New Issue
Block a user