yggverse/yggdrasilctl

PHP library for yggdrasilctl

1.0.0 2023-10-29 04:00 UTC

This package is auto-updated.

Last update: 2024-11-29 07:03:25 UTC


README

PHP library for Yggdrasil

Usage

Get peers

\Yggverse\Yggdrasilctl\Yggdrasil::getPeers(
  array &$debug  = [],
  array $require = [
    'remote',
    'up',
    'inbound',
    'address',
    'port',
    'key',
    'priority',
    'bytes_recvd',
    'bytes_sent',
    'uptime'
  ]
)
Attributes
  • debug - optional array of details for each peer that does not match condition bellow
  • require - optional array of required fields that peer must to contain or skip in result
Example

Returns peers that contain remote and uptime fields, skip other

$debug = [];

if (false === $peers = \Yggverse\Yggdrasilctl\Yggdrasil::getPeers($debug, ['remote', 'uptime']))
{
  var_dump($debug);
}

var_dump($peers);

Compatibility