Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
CRAP
100.00% covered (success)
100.00%
1 / 1
PoolSlot
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
1 / 1
 __construct
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3/**
4 * SPDX-License-Identifier: EUPL-1.2
5 *
6 * This file is part of icap-flow.
7 *
8 * Licensed under the EUPL, Version 1.2 only (the "Licence");
9 * you may not use this work except in compliance with the Licence.
10 * You may obtain a copy of the Licence at:
11 *
12 *     https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
13 *
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the Licence is distributed on an "AS IS" basis,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 */
18
19declare(strict_types=1);
20
21namespace Ndrstmr\Icap\Transport;
22
23/**
24 * One connection the pool answers for, from the moment room is reserved for it until its socket is closed.
25 * It says what the connection counts against (the endpoint), where it may be given back to (the bucket: the
26 * endpoint and the TLS context it was opened for) and whether it sits idle in the pool.
27 *
28 * A slot lives in exactly one of the pool's registries, so it is counted once and given up once.
29 *
30 * @internal
31 */
32final class PoolSlot
33{
34    public bool $idle = false;
35
36    public function __construct(
37        public readonly string $endpoint,
38        public readonly string $bucket,
39    ) {
40    }
41}