| @@ 24-79 (lines=56) @@ | ||
| 21 | * @autogenerated |
|
| 22 | * @codeCoverageIgnore |
|
| 23 | */ |
|
| 24 | final class Bitswap implements Api |
|
| 25 | { |
|
| 26 | /** |
|
| 27 | * Show the current ledger for a peer. |
|
| 28 | * |
|
| 29 | * @Endpoint(name="bitswap:ledger") |
|
| 30 | * |
|
| 31 | * @param string $arg the PeerID (B58) of the ledger to inspect |
|
| 32 | * |
|
| 33 | * @return Command |
|
| 34 | */ |
|
| 35 | public function ledger(string $arg): Command |
|
| 36 | { |
|
| 37 | return new Command(__METHOD__, get_defined_vars()); |
|
| 38 | } |
|
| 39 | ||
| 40 | /** |
|
| 41 | * Show some diagnostic information on the bitswap agent. |
|
| 42 | * |
|
| 43 | * @Endpoint(name="bitswap:stat") |
|
| 44 | * |
|
| 45 | * @return Command |
|
| 46 | */ |
|
| 47 | public function stat(): Command |
|
| 48 | { |
|
| 49 | return new Command(__METHOD__, get_defined_vars()); |
|
| 50 | } |
|
| 51 | ||
| 52 | /** |
|
| 53 | * Remove a given block from your wantlist. |
|
| 54 | * |
|
| 55 | * @Endpoint(name="bitswap:unwant") |
|
| 56 | * |
|
| 57 | * @param string $arg key(s) to remove from your wantlist |
|
| 58 | * |
|
| 59 | * @return Command |
|
| 60 | */ |
|
| 61 | public function unwant(string $arg): Command |
|
| 62 | { |
|
| 63 | return new Command(__METHOD__, get_defined_vars()); |
|
| 64 | } |
|
| 65 | ||
| 66 | /** |
|
| 67 | * Show blocks currently on the wantlist. |
|
| 68 | * |
|
| 69 | * @Endpoint(name="bitswap:wantlist") |
|
| 70 | * |
|
| 71 | * @param string $peer specify which peer to show wantlist for |
|
| 72 | * |
|
| 73 | * @return Command |
|
| 74 | */ |
|
| 75 | public function wantlist(string $peer = null): Command |
|
| 76 | { |
|
| 77 | return new Command(__METHOD__, get_defined_vars()); |
|
| 78 | } |
|
| 79 | } |
|
| 80 | ||
| @@ 24-77 (lines=54) @@ | ||
| 21 | * @autogenerated |
|
| 22 | * @codeCoverageIgnore |
|
| 23 | */ |
|
| 24 | final class Diag implements Api |
|
| 25 | { |
|
| 26 | /** |
|
| 27 | * Clear inactive requests from the log. |
|
| 28 | * |
|
| 29 | * @Endpoint(name="diag:cmds:clear") |
|
| 30 | * |
|
| 31 | * @return Command |
|
| 32 | */ |
|
| 33 | public function cmdsClear(): Command |
|
| 34 | { |
|
| 35 | return new Command(__METHOD__, get_defined_vars()); |
|
| 36 | } |
|
| 37 | ||
| 38 | /** |
|
| 39 | * Set how long to keep inactive requests in the log. |
|
| 40 | * |
|
| 41 | * @Endpoint(name="diag:cmds:set-time") |
|
| 42 | * |
|
| 43 | * @param string $arg time to keep inactive requests in log |
|
| 44 | * |
|
| 45 | * @return Command |
|
| 46 | */ |
|
| 47 | public function cmdsSetTime(string $arg): Command |
|
| 48 | { |
|
| 49 | return new Command(__METHOD__, get_defined_vars()); |
|
| 50 | } |
|
| 51 | ||
| 52 | /** |
|
| 53 | * Generate a network diagnostics report. |
|
| 54 | * |
|
| 55 | * @Endpoint(name="diag:net") |
|
| 56 | * |
|
| 57 | * @param string $vis output format |
|
| 58 | * |
|
| 59 | * @return Command |
|
| 60 | */ |
|
| 61 | public function net(string $vis = 'text'): Command |
|
| 62 | { |
|
| 63 | return new Command(__METHOD__, get_defined_vars()); |
|
| 64 | } |
|
| 65 | ||
| 66 | /** |
|
| 67 | * Print system diagnostic information. |
|
| 68 | * |
|
| 69 | * @Endpoint(name="diag:sys") |
|
| 70 | * |
|
| 71 | * @return Command |
|
| 72 | */ |
|
| 73 | public function sys(): Command |
|
| 74 | { |
|
| 75 | return new Command(__METHOD__, get_defined_vars()); |
|
| 76 | } |
|
| 77 | } |
|
| 78 | ||
| @@ 24-81 (lines=58) @@ | ||
| 21 | * @autogenerated |
|
| 22 | * @codeCoverageIgnore |
|
| 23 | */ |
|
| 24 | final class Pubsub implements Api |
|
| 25 | { |
|
| 26 | /** |
|
| 27 | * List subscribed topics by name. |
|
| 28 | * |
|
| 29 | * @Endpoint(name="pubsub:ls") |
|
| 30 | * |
|
| 31 | * @return Command |
|
| 32 | */ |
|
| 33 | public function ls(): Command |
|
| 34 | { |
|
| 35 | return new Command(__METHOD__, get_defined_vars()); |
|
| 36 | } |
|
| 37 | ||
| 38 | /** |
|
| 39 | * List peers we are currently pubsubbing with. |
|
| 40 | * |
|
| 41 | * @Endpoint(name="pubsub:peers") |
|
| 42 | * |
|
| 43 | * @param string $arg topic to list connected peers of Required: no |
|
| 44 | * |
|
| 45 | * @return Command |
|
| 46 | */ |
|
| 47 | public function peers(string $arg = null): Command |
|
| 48 | { |
|
| 49 | return new Command(__METHOD__, get_defined_vars()); |
|
| 50 | } |
|
| 51 | ||
| 52 | /** |
|
| 53 | * Publish a message to a given pubsub topic. |
|
| 54 | * |
|
| 55 | * @Endpoint(name="pubsub:pub") |
|
| 56 | * |
|
| 57 | * @param string $arg topic to publish to |
|
| 58 | * @param string $arg1 payload of message to publish |
|
| 59 | * |
|
| 60 | * @return Command |
|
| 61 | */ |
|
| 62 | public function pub(string $arg, string $arg1): Command |
|
| 63 | { |
|
| 64 | return new Command(__METHOD__, get_defined_vars()); |
|
| 65 | } |
|
| 66 | ||
| 67 | /** |
|
| 68 | * Subscribe to messages on a given topic. |
|
| 69 | * |
|
| 70 | * @Endpoint(name="pubsub:sub") |
|
| 71 | * |
|
| 72 | * @param string $arg string name of topic to subscribe to |
|
| 73 | * @param bool $discover try to discover other peers subscribed to the same topic |
|
| 74 | * |
|
| 75 | * @return Command |
|
| 76 | */ |
|
| 77 | public function sub(string $arg, bool $discover = null): Command |
|
| 78 | { |
|
| 79 | return new Command(__METHOD__, get_defined_vars()); |
|
| 80 | } |
|
| 81 | } |
|
| 82 | ||