astrXbian/www/multitube/vendor/ipfs/php-client/src/Api/Stats.php

69 lines
1.7 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
declare(strict_types=1);
/*
* This file is part of the "php-ipfs" package.
*
* (c) Robert Schönthal <robert.schoenthal@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace IPFS\Api;
use IPFS\Annotation\Api as Endpoint;
use IPFS\Command\Command;
/**
* @author Robert Schönthal <robert.schoenthal@gmail.com>
* @autogenerated
* @codeCoverageIgnore
*/
final class Stats implements Api
{
/**
* Show some diagnostic information on the bitswap agent.
*
* @Endpoint(name="stats:bitswap")
*
* @return Command
*/
public function bitswap(): Command
{
return new Command(__METHOD__, get_defined_vars());
}
/**
* Print ipfs bandwidth information.
*
* @Endpoint(name="stats:bw")
*
* @param string $peer specify a peer to print bandwidth for
* @param string $proto specify a protocol to print bandwidth for
* @param bool $poll print bandwidth at an interval
* @param string $interval time interval to wait between updating output, if poll is true
*
* @return Command
*/
public function bw(string $peer = null, string $proto = null, bool $poll = false, string $interval = null): Command
{
return new Command(__METHOD__, get_defined_vars());
}
/**
* Get stats for the currently used repo.
*
* @Endpoint(name="stats:repo")
*
* @param bool $human output RepoSize in MiB
*
* @return Command
*/
public function repo(bool $human = false): Command
{
return new Command(__METHOD__, get_defined_vars());
}
}