File tree Expand file tree Collapse file tree 2 files changed +16
-7
lines changed
Expand file tree Collapse file tree 2 files changed +16
-7
lines changed Original file line number Diff line number Diff line change @@ -707,12 +707,20 @@ public Map stat(Cid cid) throws IOException {
707707 }
708708
709709 public class Diag {
710- public String cmds () throws IOException {
711- return new String ( retrieve ("diag/cmds?stream-channels=true" ) );
710+ public List < Map > cmds () throws IOException {
711+ return ( List ) retrieveAndParse ("diag/cmds" );
712712 }
713713
714- public String sys () throws IOException {
715- return new String (retrieve ("diag/sys?stream-channels=true" ));
714+ public List <Map > cmds (boolean verbose ) throws IOException {
715+ return (List )retrieveAndParse ("diag/cmds?verbose=" + verbose );
716+ }
717+
718+ public String clearCmds () throws IOException {
719+ return retrieveString ("diag/cmds/clear" );
720+ }
721+
722+ public Map sys () throws IOException {
723+ return retrieveMap ("diag/sys?stream-channels=true" );
716724 }
717725 }
718726
Original file line number Diff line number Diff line change @@ -763,9 +763,10 @@ public void diagTest() throws IOException {
763763 Map setResult = ipfs .config .set ("Datastore.GCPeriod" , val );
764764 ipfs .config .replace (new NamedStreamable .ByteArrayWrapper (JSONParser .toString (config ).getBytes ()));
765765// Object log = ipfs.log();
766- String sys = ipfs .diag .sys ();
767- String cmds = ipfs .diag .cmds ();
768-
766+ Map sys = ipfs .diag .sys ();
767+ List <Map > cmds = ipfs .diag .cmds (true );
768+ String res = ipfs .diag .clearCmds ();
769+ List <Map > cmds2 = ipfs .diag .cmds (true );
769770 //String profile = "default";
770771 //ipfs.config.profileApply(profile, true);
771772 //Map entry = ipfs.config("Addresses.API", Optional.of("/ip4/127.0.0.1/tcp/5001"), Optional.empty());
You can’t perform that action at this time.
0 commit comments