Fix request_timeout example and doc

Arg name should be _request_timeout.
Single value type should be int or long.

Signed-off-by: Hemslo Wang <hemslo.wang@gmail.com>
This commit is contained in:
Hemslo Wang 2023-06-07 22:16:28 +10:00 committed by Yu Liao
parent 3a4202e5a8
commit 9b8d976877
2 changed files with 3 additions and 3 deletions

View File

@ -51,7 +51,7 @@ def main():
# Creating configmap `request-timeout-test-configmap` in the `default` namespace
# Client-side timeout to 60 seconds
configmap = api.create(body=configmap_manifest, namespace="default", _request_time=60)
configmap = api.create(body=configmap_manifest, namespace="default", _request_timeout=60)
print("\n[INFO] configmap `request-timeout-test-configmap` created\n")
@ -59,7 +59,7 @@ def main():
# Client-side timeout to 60 seconds
configmap_list = api.get(
name=configmap_name, namespace="default", label_selector="foo=bar", _request_time=60
name=configmap_name, namespace="default", label_selector="foo=bar", _request_timeout=60
)
print("NAME:\n%s\n" % (configmap_list.metadata.name))

View File

@ -50,7 +50,7 @@ There are two inputs available in the client, that could be used to set connecti
- The value of the argument `_request_timeout`, **n** (which is time duration in seconds) is set to the socket used for the connection.
- In case, if the `_request_timeout` value is set, this argument can accept 2 types of input values ~
- float,
- int/long
- a tuple (with a length of 2)
***Refer***