MongoDB\Driver\ServerDescription::getHelloResponse
(mongodb >=1.13.0)
MongoDB\Driver\ServerDescription::getHelloResponse — Returns the server's most recent "hello" response
说明
Returns an array of information describing the server. This array is derived from the most recent (at the time the MongoDB\Driver\ServerDescription was constructed) » hello command response obtained through » server monitoring.
注意:
When the driver is connected to a load balancer, this method will return an empty array since load balancers are not monitored. This is in contrast to MongoDB\Driver\Server::getInfo(), which would return the backing server's » hello command response from the initial connection handshake.
参数
此函数没有参数。
返回值
Returns an array of information describing this server.
错误/异常
- Throws MongoDB\Driver\Exception\InvalidArgumentException on argument parsing errors.
参见
- MongoDB\Driver\Server::getInfo() - Returns an array of information describing this server
- » hello command in the MongoDB manual
- » Server Discovery and Monitoring Specification
用户贡献的备注
备份地址:http://www.lvesu.com/blog/php/mongodb-driver-serverdescription.gethelloresponse.php