2026-10-05 18:10:18 -04:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
|
|
namespace Pterodactyl\Contracts\Activity;
|
|
|
|
|
|
2026-10-11 09:43:40 -04:00
|
|
|
use Illuminate\Validation\ValidationException;
|
2026-10-05 18:10:18 -04:00
|
|
|
use Pterodactyl\Models\Node;
|
|
|
|
|
|
|
|
|
|
interface IngestsActivityLogs
|
|
|
|
|
{
|
2026-10-11 09:43:40 -04:00
|
|
|
/**
|
2026-10-11 23:50:53 -04:00
|
|
|
* Record the activity a node reported against the servers it runs. The input is the report
|
|
|
|
|
* Wings sends, validated here under the field names of its protocol. Events for servers on
|
|
|
|
|
* other nodes, and events outside the `server:` namespace, are dropped.
|
2026-10-11 09:43:40 -04:00
|
|
|
*
|
2026-10-11 19:54:55 -04:00
|
|
|
* @param array<string, mixed> $input data: the events, each with server, event, metadata and timestamp, and optionally user and ip
|
2026-10-11 09:43:40 -04:00
|
|
|
*
|
|
|
|
|
* @throws ValidationException
|
|
|
|
|
*/
|
|
|
|
|
public function ingest(Node $node, array $input): void;
|
2026-10-05 18:10:18 -04:00
|
|
|
}
|