@@ -50,16 +50,16 @@ class Nats:
5050 def __new__ (
5151 cls ,
5252 / ,
53- addrs : list [str ] = [ "nats://localhost:4222" ] ,
53+ addrs : list [str ] | None = None ,
5454 user_and_pass : tuple [str , str ] | None = None ,
5555 nkey : str | None = None ,
5656 token : str | None = None ,
5757 custom_inbox_prefix : str | None = None ,
58- read_buffer_capacity : int = 65535 ,
59- sender_capacity : int = 128 ,
58+ read_buffer_capacity : int = ..., # 65535 bytes
59+ sender_capacity : int = ..., # 128 bytes
6060 max_reconnects : int | None = None ,
61- connection_timeout : float | timedelta = ...,
62- request_timeout : float | timedelta = ...,
61+ connection_timeout : float | timedelta = ..., # 5 sec
62+ request_timeout : float | timedelta = ..., # 10 sec
6363 ) -> Self : ...
6464 async def startup (self ) -> None : ...
6565 async def shutdown (self ) -> None : ...
@@ -78,8 +78,8 @@ class Nats:
7878 payload : bytes | str | bytearray | memoryview ,
7979 * ,
8080 headers : dict [str , Any ] | None = None ,
81- reply : str | None = None ,
82- err_on_disconnect : bool = False ,
81+ inbox : str | None = None ,
82+ timeout : float | timedelta | None = None ,
8383 ) -> None : ...
8484 async def drain (self ) -> None : ...
8585 async def flush (self ) -> None : ...
@@ -95,6 +95,16 @@ class Nats:
9595 subject : str ,
9696 callback : None = None ,
9797 ) -> IteratorSubscription : ...
98- async def jetstream (self ) -> js .JetStream : ...
98+ async def jetstream (
99+ self ,
100+ * ,
101+ domain : str | None = None ,
102+ api_prefix : str | None = None ,
103+ timeout : timedelta | None = None ,
104+ ack_timeout : timedelta | None = None ,
105+ concurrency_limit : int | None = None ,
106+ max_ack_inflight : int | None = None ,
107+ backpressure_on_inflight : bool | None = None ,
108+ ) -> js .JetStream : ...
99109
100110__all__ = ["CallbackSubscription" , "IteratorSubscription" , "Message" , "Nats" , "js" ]
0 commit comments