获取产品IP
方法概览
| 项目 | 内容 |
|---|---|
| 文档类型 | PHP 类方法 |
| 方法标识 | app\common\model\HostIpModel::getHostIp |
| 所属业务 | 产品管理 |
| 来源模块/系统 | 产品IP模型 |
功能说明
获取产品IP
调用示例
$param = ['host_id' => 1];
$result = (new \app\common\model\HostIpModel())->getHostIp($param);参数
| 参数 | 类型 | 必填 | 默认值 | 校验规则 | 说明 |
|---|---|---|---|---|---|
param.host_id | int | 是 | — | require | 产品ID |
返回值
| 返回项 | 类型 | 说明 |
|---|---|---|
dedicate_ip | string | 主IP |
assign_ip | string | 附加IP(英文逗号分隔) |
ip_num | int | IP数量 |
正常返回
{
"dedicate_ip": "192.0.2.1",
"assign_ip": "example-token",
"ip_num": 1
}异常情况
| 异常类型 | 说明 |
|---|---|
Throwable | 调用失败时由具体实现抛出异常,异常信息以运行时结果为准。 |