@@ -92,7 +92,7 @@ public IPFS(String host, int port, String version, int connectTimeoutMillis, int
9292 throw new RuntimeException (e );
9393 }
9494 }
95-
95+
9696 /**
9797 * Configure a HTTP client timeout
9898 * @param timeout (default 0: infinite timeout)
@@ -102,6 +102,10 @@ public IPFS timeout(int timeout) {
102102 return new IPFS (host , port , version , timeout , timeout , protocol .equals ("https" ));
103103 }
104104
105+ public String shutdown () throws IOException {
106+ return retrieveString ("shutdown" );
107+ }
108+
105109 public List <MerkleNode > add (NamedStreamable file ) throws IOException {
106110 return add (file , false );
107111 }
@@ -829,9 +833,21 @@ public Map id() throws IOException {
829833 }
830834
831835 public class Stats {
836+ public Map bitswap (boolean verbose , boolean humanReadable ) throws IOException {
837+ return retrieveMap ("stats/bitswap?verbose=" + verbose + "&human=" + humanReadable );
838+ }
832839 public Map bw () throws IOException {
833840 return retrieveMap ("stats/bw" );
834841 }
842+ public Map dht () throws IOException {
843+ return retrieveMap ("stats/dht" );
844+ }
845+ public Map provide () throws IOException {
846+ return retrieveMap ("stats/provide" );
847+ }
848+ public Map repo (boolean sizeOnly , boolean humanReadable ) throws IOException {
849+ return retrieveMap ("stats/repo?size-only=" + sizeOnly + "&human=" + humanReadable );
850+ }
835851 }
836852
837853 // Tools
0 commit comments