Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
pterodactyl
GitHub Repository: pterodactyl/panel
Path: blob/1.0-develop/app/Contracts/Repository/AllocationRepositoryInterface.php
10279 views
1
<?php
2
3
namespace Pterodactyl\Contracts\Repository;
4
5
use Pterodactyl\Models\Allocation;
6
7
interface AllocationRepositoryInterface extends RepositoryInterface
8
{
9
/**
10
* Return all the allocations that exist for a node that are not currently
11
* allocated.
12
*/
13
public function getUnassignedAllocationIds(int $node): array;
14
15
/**
16
* Return a single allocation from those meeting the requirements.
17
*/
18
public function getRandomAllocation(array $nodes, array $ports, bool $dedicated = false): ?Allocation;
19
}
20
21