File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,11 @@ class Ydb
4242 */
4343 protected $ grpc_config ;
4444
45+ /**
46+ * @var int|null
47+ */
48+ protected $ grpcTimeout ;
49+
4550 /**
4651 * @var Iam
4752 */
@@ -112,6 +117,7 @@ public function __construct($config = [], LoggerInterface $logger = null)
112117 $ this ->database = $ config ['database ' ] ?? null ;
113118 $ this ->iam_config = $ config ['iam_config ' ] ?? [];
114119 $ this ->grpc_config = (array ) ($ config ['grpc ' ] ?? []);
120+ $ this ->grpcTimeout = $ config ['grpc ' ]['timeout ' ] ?? null ;
115121
116122 if (!is_null ($ logger ) && isset ($ config ['logger ' ])){
117123 throw new \Exception ('Logger set in 2 places ' );
@@ -187,6 +193,16 @@ public function grpcOpts(): array
187193 return $ grpcOpts ;
188194 }
189195
196+ /**
197+ * Get gRPC timeout in microseconds
198+ *
199+ * @return int|null
200+ */
201+ public function getGrpcTimeout ()
202+ {
203+ return $ this ->grpcTimeout ;
204+ }
205+
190206 /**
191207 * Discover available endpoints to connect to.
192208 *
You can’t perform that action at this time.
0 commit comments