Skip to content

Commit d067ede

Browse files
committed
add LB
1 parent d1859d5 commit d067ede

File tree

3 files changed

+56
-7
lines changed

3 files changed

+56
-7
lines changed

src/QCloud.php

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,13 @@
1010
use yii\di\ServiceLocator;
1111
use yii\base\InvalidConfigException;
1212
use xutl\qcloud\components\Cdn;
13-
use xutl\qcloud\components\Cmq;
13+
use xutl\qcloud\components\MQ;
14+
use xutl\qcloud\components\LB;
1415

1516
/**
1617
* Class QCloud
1718
* @property Cdn $cdn CDN操控
19+
* @property MQ $mq CMQ操控
1820
* @package xutl\qcloud
1921
*/
2022
class QCloud extends ServiceLocator
@@ -84,12 +86,21 @@ public function getCdn()
8486
}
8587

8688
/**
87-
* @return Cmq|object
89+
* @return MQ|object
8890
* @throws InvalidConfigException
8991
*/
90-
public function getCmq()
92+
public function getMq()
9193
{
92-
return $this->get('cmq');
94+
return $this->get('mq');
95+
}
96+
97+
/**
98+
* @return LB|object
99+
* @throws InvalidConfigException
100+
*/
101+
public function getLb()
102+
{
103+
return $this->get('lb');
93104
}
94105

95106
/**
@@ -100,7 +111,8 @@ public function coreComponents()
100111
{
101112
return [
102113
'cdn' => ['class' => 'xutl\qcloud\components\Cdn'],
103-
'cmq' => ['class' => 'xutl\qcloud\components\Cmq'],
114+
'mq' => ['class' => 'xutl\qcloud\components\MQ'],
115+
'lb' => ['class' => 'xutl\qcloud\components\LB'],
104116
];
105117
}
106118
}

src/components/LB.php

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<?php
2+
/**
3+
* @link http://www.tintsoft.com/
4+
* @copyright Copyright (c) 2012 TintSoft Technology Co. Ltd.
5+
* @license http://www.tintsoft.com/license/
6+
*/
7+
8+
9+
namespace xutl\qcloud\components;
10+
11+
12+
use xutl\qcloud\BaseClient;
13+
14+
/**
15+
* Class LB
16+
*
17+
* 通用负载均衡相关接口
18+
* @method inquiryLBPrice(array $params) 查询负载均衡实例的价格
19+
* @method createLoadBalancer(array $params) 通过该接口来购买负载均衡
20+
* @method describeLoadBalancers(array $params) 查询负载均衡实例的列表
21+
* @method deleteLoadBalancers(array $params) 删除负载均衡实例
22+
* @method describeLoadBalancersTaskResult(array $params) 查询负载均衡异步操作接口的执行结果
23+
* @method getCertListWithLoadBalancer(array $params) 查询证书关联的负载均衡信息
24+
* @method describeLoadBalancerLog(array $params) 查询负载均衡应用层日志
25+
* @method getMonitorData(array $params) 查询负载均衡的监控数据
26+
* @method replaceCert(array $params) 更换负载均衡使用的证书
27+
*
28+
*
29+
* @package xutl\qcloud\components
30+
*
31+
* @author Tongle Xu <[email protected]>
32+
* @since 1.0
33+
*/
34+
class LB extends BaseClient
35+
{
36+
public $baseUrl = 'https://lb.api.qcloud.com/v2/index.php';
37+
}

src/components/Cmq.php renamed to src/components/MQ.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
use yii\base\InvalidConfigException;
1313

1414
/**
15-
* Class Cmq
15+
* Class MQ
1616
* @package xutl\qcloud\components
1717
*
1818
* @author Tongle Xu <[email protected]>
1919
* @since 1.0
2020
*/
21-
class Cmq extends BaseClient
21+
class MQ extends BaseClient
2222
{
2323
/**
2424
* @throws InvalidConfigException

0 commit comments

Comments
 (0)