Skip to content

Commit 18a71c5

Browse files
authored
Merge pull request #4 from jmara/feature/SendCommand
Add method to send a command / action to HAProxy Backend e.g. drain, …
2 parents 35835e0 + fd06206 commit 18a71c5

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

src/HAProxy/Command/SendCommand.php

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<?php
2+
/**
3+
* HAProxyAPI is a PHP API to access/administrate HAProxy via
4+
* UNIX Sockets, TCP Sockets and/or the HAProxy HTTP interface.
5+
*
6+
* HAProxyAPI was written by Steve Kamerman, 2016 and is distributed
7+
* via GitHub at https://github.com/kamermans/HAProxyAPI
8+
*
9+
* @author Jan Mara
10+
* @copyright Steve Kamerman, 2016
11+
* @license GNU GPLv3
12+
*
13+
* This file is part of HAProxyAPI.
14+
*
15+
* HAProxyAPI is free software: you can redistribute it and/or modify
16+
* it under the terms of the GNU General Public License as published by
17+
* the Free Software Foundation, either version 3 of the License, or
18+
* (at your option) any later version.
19+
*
20+
* HAProxyAPI is distributed in the hope that it will be useful,
21+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
22+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23+
* GNU General Public License for more details.
24+
*
25+
* You should have received a copy of the GNU General Public License
26+
* along with HAProxyAPI. If not, see <http://www.gnu.org/licenses/>.
27+
*/
28+
29+
namespace HAProxy\Command;
30+
31+
class SendCommand extends EnableServer {
32+
public function __construct($backend, $server, $action) {
33+
$this->backend = $backend;
34+
$this->server = $server;
35+
$this->action = $action;
36+
}
37+
}

0 commit comments

Comments
 (0)