public TaskStatus $status = 'TaskStatus'
public int $lastHeartbeat
Configuration for the task, such as retry count, retry delay, and expiration time.
protected Endpoint $endpoint
private string $recvBuffer
private array $subscriptions
public __construct(Main $agent, Logger $log): void
Parameter | Type | Description |
---|
$agent | Main | |
$log | Logger | |
Executes the task with the given callable and parameters.
public exec(Endpoint $endpoint): self
Parameter | Type | Description |
---|
$endpoint | Endpoint | |
public cancel(int $expire = 30): self
Parameter | Type | Description |
---|
$expire | int | |
public recv(string $buf): self
Parameter | Type | Description |
---|
$buf | string | |
public send(PacketType $command, mixed $payload): bool
Parameter | Type | Description |
---|
$command | PacketType | |
$payload | mixed | |
protected processCommand(PacketType $command, mixed $payload): bool
Parameter | Type | Description |
---|
$command | PacketType | |
$payload | mixed | |
private commandTrigger(string $eventID, mixed $data, bool $echoClient = true): bool
Parameter | Type | Description |
---|
$eventID | string | |
$data | mixed | |
$echoClient | bool | |
private commandSubscribe(string $eventID, ?array $filter): bool
Parameter | Type | Description |
---|
$eventID | string | |
$filter | array | |
private commandUnsubscribe(string $eventID): bool
Parameter | Type | Description |
---|
$eventID | string | |
private commandLog(\stdClass $payload): bool
Parameter | Type | Description |
---|
$payload | \stdClass | |
private processPacket(?string $buffer): string
Parameter | Type | Description |
---|
$buffer | string | |
Generated by Hazaar API Doc Generator on Wed, 25 Jun 2025 06:07:11 +0000