From af2e0c24578330f93684dd626f17f9af71a68363 Mon Sep 17 00:00:00 2001 From: gfh31fgh2 Date: Fri, 5 Dec 2025 15:23:03 +0500 Subject: [PATCH] Update Ydb.php grpc timeout --- src/Ydb.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/Ydb.php b/src/Ydb.php index 7de8b98a..b3415ce5 100644 --- a/src/Ydb.php +++ b/src/Ydb.php @@ -42,6 +42,11 @@ class Ydb */ protected $grpc_config; + /** + * @var int|null + */ + protected $grpcTimeout; + /** * @var Iam */ @@ -112,6 +117,7 @@ public function __construct($config = [], LoggerInterface $logger = null) $this->database = $config['database'] ?? null; $this->iam_config = $config['iam_config'] ?? []; $this->grpc_config = (array) ($config['grpc'] ?? []); + $this->grpcTimeout = $config['grpc']['timeout'] ?? null; if (!is_null($logger) && isset($config['logger'])){ throw new \Exception('Logger set in 2 places'); @@ -187,6 +193,16 @@ public function grpcOpts(): array return $grpcOpts; } + /** + * Get gRPC timeout in microseconds + * + * @return int|null + */ + public function getGrpcTimeout() + { + return $this->grpcTimeout; + } + /** * Discover available endpoints to connect to. *