Cluster
Less than 1 minute
Cluster
Manages peer connectivity and command routing for Warlock clustering.
class ClusterProperties
peers
public array $peersType: array
log
Logger used by cluster manager operations.
private Logger $logType: Hazaar\Warlock\Logger
config
Raw cluster configuration, retained so it can be forwarded to Peer connections, which
private array $configType: array
also read additional keys (e.g. peerReconnect, accessKey) not modelled by Options.
options
private Options $optionsType: Hazaar\Warlock\Server\Component\Cluster\Options
Methods
__construct
public __construct(Logger $log, array $config): voidParameters
| Parameter | Type | Description |
|---|---|---|
$log | Hazaar\Warlock\Logger | |
$config | array |
start
Starts peer connections configured for cluster mode.
public start(Main $main): voidReturns: void
Parameters
| Parameter | Type | Description |
|---|---|---|
$main | Hazaar\Warlock\Server\Main |
stop
public stop(): voidReturns: void
addPeer
public addPeer(Peer $peer): voidReturns: void
Parameters
| Parameter | Type | Description |
|---|---|---|
$peer | Hazaar\Warlock\Server\Client\Peer |
removePeer
public removePeer(Peer $peer): voidReturns: void
Parameters
| Parameter | Type | Description |
|---|---|---|
$peer | Hazaar\Warlock\Server\Client\Peer |
process
public process(): voidReturns: void
processCommand
public processCommand(Peer $peer, PacketType $command, ?\stdClass $payload): voidReturns: void
Parameters
| Parameter | Type | Description |
|---|---|---|
$peer | Hazaar\Warlock\Server\Client\Peer | |
$command | Hazaar\Warlock\Enum\PacketType | |
$payload | stdClass |
Generated by Hazaar API Doc Generator on Fri, 04 Sep 2026 23:32:17 +0000