Client-side deadline interceptor (grpc-timeout + local cancellation) for thesis/grpc.
Client-side deadline interceptor for thesis/grpc. It gives every outgoing call a deadline and applies it in two places so the client and server agree on it:
grpc-timeout header, which the server enforces (cancelling the RPC and returning
DEADLINE_EXCEEDED);TimeoutCancellation, so the client gives up on its own even if the server never
responds (a plain client deadline otherwise never reaches the server — the transport does not set
grpc-timeout by itself).composer require thesis/grpc-deadlineUsage
Register the interceptor on the client's unary and stream chains. A default deadline covers every call:
use Thesis\Grpc\Client; use Thesis\Grpc\Deadline; use Thesis\Grpc\Metadata\Timeout; $deadline = new Deadline\ClientInterceptor(Timeout::seconds(30)); $client = new Client\Builder() ->withUnaryInterceptors($deadline) ->withStreamInterceptors($deadline) ->build();
Override it per call by attaching a Timeout to the call's metadata — the call's own deadline wins
over the default:
use Thesis\Grpc\Metadata; use Thesis\Grpc\Metadata\Timeout; $client->invoke($request, $invoke, new Metadata()->withKey(Timeout::milliseconds(200)));
Constructed with no default (new Deadline\ClientInterceptor()), the interceptor only acts on calls
that carry their own grpc-timeout, and leaves the rest untouched.
| # | Наименование новости | Тональность | Информативность | Дата публикации |
|---|---|---|---|---|
| 1 | thesis/grpc-retry | 0 | 27.38 | 03-08-2026 |
| 2 | thesis/grpc-auth | 0 | 17.78 | 03-08-2026 |
| 3 | thesis/grpc-logging | 0 | 35 | 03-08-2026 |
| 4 | lumnd/platophp | 0 | 17.69 | 03-08-2026 |
| 5 | picodev 0.1.4 | 0 | 5 | 10-07-2026 |
| 6 | tensor-grep 1.58.0 | 0 | 5 | 10-07-2026 |
| 7 | baponi 0.5.1 | 0 | 5 | 10-07-2026 |
| 8 | 3.1.111 | 0 | 5 | 11-06-2026 |
| 9 | 3.1.101 | 0 | 5 | 26-05-2026 |
| 10 | automattic/blocks-engine-php-transformer | 0 | 17.14 | 03-08-2026 |