Add diag calls.
This commit is contained in:
parent
4e947ecb6e
commit
cf43d4006d
33
main.lisp
33
main.lisp
|
@ -414,13 +414,13 @@
|
|||
(ipfs-call "dht/get" `(("arg" ,key)))
|
||||
(gethash "Addrs" (car (gethash "Responses"result)))))
|
||||
|
||||
;; STRING [:BOOLEAN] → NIL || (NIL STRING)
|
||||
;; STRING [:BOOLEAN] → NIL
|
||||
(defun dht-provide (key &key (recursive nil))
|
||||
"Announce to the network that you're providing the given values.
|
||||
/ipns/docs.ipfs.io/reference/api/http/#api-v0-dht-provide"
|
||||
(ipfs-call "dht/provide" `(("arg" ,key)("recursive" ,recursive))))
|
||||
|
||||
;; STRING STRING → NIL || (NIL STRING)
|
||||
;; STRING STRING → NIL
|
||||
(defun dht-put (key value)
|
||||
"Write a key-value pair to the routing system.
|
||||
/ipns/docs.ipfs.io/reference/api/http/#api-v0-dht-put"
|
||||
|
@ -436,6 +436,35 @@
|
|||
|
||||
|
||||
|
||||
;; —————————————————————————————————————
|
||||
;; DIAG CALLS
|
||||
|
||||
;; NIL → ALIST || (NIL STRING)
|
||||
(defun diag-cmds ()
|
||||
"List commands run on this IPFS node.
|
||||
/ipns/docs.ipfs.io/reference/api/http/#api-v0-diag-cmds"
|
||||
(mapcar #'re-hash-table-alist (ipfs-call "diag/cmds" '())))
|
||||
|
||||
;; NIL → STRING
|
||||
(defun diag-cmds-clear ()
|
||||
"Clear inactive requests from the log.
|
||||
/ipns/docs.ipfs.io/reference/api/http/#api-v0-diag-cmds-clear"
|
||||
(ipfs-call "diag/cmds/clear" '()))
|
||||
|
||||
;; NUMBER → STRING
|
||||
(defun diag-cmds-set-time (time)
|
||||
"Set how long to keep inactive requests in the log.
|
||||
/ipns/docs.ipfs.io/reference/api/http/#api-v0-diag-cmds-set-time"
|
||||
(ipfs-call "diag/cmds/set-time" `(("arg" ,time))))
|
||||
|
||||
;; NIL → STRING
|
||||
(defun diag-sys ()
|
||||
"Print system diagnostic info.
|
||||
/ipns/docs.ipfs.io/reference/api/http/#api-v0-diag-sys"
|
||||
(ipfs-call "diag/sys" '()))
|
||||
|
||||
|
||||
|
||||
;; —————————————————————————————————————
|
||||
;; VERSION CALLS
|
||||
|
||||
|
|
|
@ -56,6 +56,12 @@
|
|||
:dht-put
|
||||
:dht-query
|
||||
|
||||
;; diag calls
|
||||
:diag-cmds
|
||||
:diag-cmds-clear
|
||||
:diag-cmds-set-time
|
||||
:diag-sys
|
||||
|
||||
;; version calls
|
||||
:version
|
||||
:version-deps))
|
||||
|
|
Ŝarĝante…
Reference in New Issue