File tree 1 file changed +19
-0
lines changed
1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,25 @@ def main():
31
31
v1 = client .CoreV1Api ()
32
32
count = 10
33
33
w = watch .Watch ()
34
+ """
35
+ [INFO: `server-side` & `client-side` timeout]
36
+
37
+ `kwargs['timeout_seconds'] = n`:
38
+ - It is a server-side timeout, i.e. a polite request to the server,
39
+ mentioning it to cleanly close the connection after n seconds.
40
+ - If the user have a network outage, then this parameter will do nothing.
41
+ - The client will hang indefinitely without raising an exception.
42
+ - You can set this number much higher, maybe to 3600 seconds (1h).
43
+
44
+ `kwargs['_request_timeout'] = n`:
45
+ - It is a client-side timeout, configuring the user's local socket.
46
+ - If the user have a network outage, resulting into dropping all packets
47
+ with no RST/FIN, the value of n will specify, for how long
48
+ the client would wait before realizing the network outage,
49
+ & dropping the connection.
50
+ - The connection will drop, followed by raising an exception.
51
+ - You can keep this number low.
52
+ """
34
53
for event in w .stream (v1 .list_namespace , timeout_seconds = 10 ):
35
54
print ("Event: %s %s" % (event ['type' ], event ['object' ].metadata .name ))
36
55
count -= 1
You can’t perform that action at this time.
0 commit comments