tars-utils documentation
Introduction
tars-utils is an auxiliary library for phptars, which mainly provides the following functions:
Configuration file analysis and cache (swoole table)
Master address resolution
Node report configuration analysis
Instructions
Configuration file parsing
Take QDPHP.TARSServer.config.conf as an example, parse the conf file into an array
Geocoding
$locatorString = "tars.tarsregistry.QueryObj@tcp -h 127.0.0.1 -p 17890:tcp -h 127.0.0.1 -p 17890";
$locatorInfo = \Tars\Utils::getLocatorInfo($locatorString);The results are as follows:
[
'locatorName' => 'tars.tarsregistry.QueryObj',
'routeInfo' => [
[
'sHost' => '127.0.0.1',
'sProtocol' => 'tcp',
'iPort' => 17890,
'iTimeout' => '',
'bIp' => '',
'sIp' => ''
],
[
'sHost' => '127.0.0.1',
'sProtocol' => 'tcp',
'iPort' => 17890,
'iTimeout' => '',
'bIp' => '',
'sIp' => ''
]
]
]Node report configuration analysis
The results are as follows:
Last updated