mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-01-03 22:43:09 +00:00
adding initial procs
This commit is contained in:
parent
9d2b931567
commit
7ff2ab01b0
@ -180,6 +180,9 @@ int waku_peer_exchange_request(void* ctx,
|
||||
int numPeers,
|
||||
WakuCallBack callback,
|
||||
void* userData);
|
||||
int waku_get_health_report(void* ctx,
|
||||
WakuCallBack callback,
|
||||
void* userData);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@ -672,5 +672,18 @@ proc waku_peer_exchange_request(
|
||||
)
|
||||
.handleRes(callback, userData)
|
||||
|
||||
proc waku_get_health_report(
|
||||
ctx: ptr WakuContext, callback: WakuCallBack, userData: pointer
|
||||
): cint {.dynlib, exportc.} =
|
||||
checkLibwakuParams(ctx, callback, userData)
|
||||
|
||||
waku_thread
|
||||
.sendRequestToWakuThread(
|
||||
ctx,
|
||||
RequestType.DEBUG,
|
||||
DebugNodeRequest.createShared(DebugNodeMsgType.GET_HEALTH_REPORT),
|
||||
)
|
||||
.handleRes(callback, userData)
|
||||
|
||||
### End of exported procs
|
||||
################################################################################
|
||||
|
||||
@ -6,6 +6,7 @@ type DebugNodeMsgType* = enum
|
||||
RETRIEVE_LISTENING_ADDRESSES
|
||||
RETRIEVE_MY_ENR
|
||||
RETRIEVE_MY_PEER_ID
|
||||
GET_HEALTH_REPORT
|
||||
|
||||
type DebugNodeRequest* = object
|
||||
operation: DebugNodeMsgType
|
||||
@ -35,6 +36,8 @@ proc process*(
|
||||
return ok(waku.node.enr.toURI())
|
||||
of RETRIEVE_MY_PEER_ID:
|
||||
return ok($waku.node.peerId())
|
||||
of GET_HEALTH_REPORT:
|
||||
|
||||
|
||||
error "unsupported operation in DebugNodeRequest"
|
||||
return err("unsupported operation in DebugNodeRequest")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user