Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
pterodactyl
GitHub Repository: pterodactyl/panel
Path: blob/1.0-develop/app/Contracts/Repository/NodeRepositoryInterface.php
10279 views
1
<?php
2
3
namespace Pterodactyl\Contracts\Repository;
4
5
use Pterodactyl\Models\Node;
6
use Illuminate\Support\Collection;
7
8
interface NodeRepositoryInterface extends RepositoryInterface
9
{
10
public const THRESHOLD_PERCENTAGE_LOW = 75;
11
public const THRESHOLD_PERCENTAGE_MEDIUM = 90;
12
13
/**
14
* Return the usage stats for a single node.
15
*/
16
public function getUsageStats(Node $node): array;
17
18
/**
19
* Return the usage stats for a single node.
20
*/
21
public function getUsageStatsRaw(Node $node): array;
22
23
/**
24
* Return a single node with location and server information.
25
*/
26
public function loadLocationAndServerCount(Node $node, bool $refresh = false): Node;
27
28
/**
29
* Attach a paginated set of allocations to a node mode including
30
* any servers that are also attached to those allocations.
31
*/
32
public function loadNodeAllocations(Node $node, bool $refresh = false): Node;
33
34
/**
35
* Return a collection of nodes for all locations to use in server creation UI.
36
*/
37
public function getNodesForServerCreation(): Collection;
38
}
39
40