Path: blob/1.0-develop/app/Contracts/Repository/NodeRepositoryInterface.php
10279 views
<?php12namespace Pterodactyl\Contracts\Repository;34use Pterodactyl\Models\Node;5use Illuminate\Support\Collection;67interface NodeRepositoryInterface extends RepositoryInterface8{9public const THRESHOLD_PERCENTAGE_LOW = 75;10public const THRESHOLD_PERCENTAGE_MEDIUM = 90;1112/**13* Return the usage stats for a single node.14*/15public function getUsageStats(Node $node): array;1617/**18* Return the usage stats for a single node.19*/20public function getUsageStatsRaw(Node $node): array;2122/**23* Return a single node with location and server information.24*/25public function loadLocationAndServerCount(Node $node, bool $refresh = false): Node;2627/**28* Attach a paginated set of allocations to a node mode including29* any servers that are also attached to those allocations.30*/31public function loadNodeAllocations(Node $node, bool $refresh = false): Node;3233/**34* Return a collection of nodes for all locations to use in server creation UI.35*/36public function getNodesForServerCreation(): Collection;37}383940