@@ -33,27 +33,12 @@ class Message:
3333 description : str | None
3434 length : int
3535
36+ def __len__ (self ) -> int : ...
37+
3638@final
3739class IteratorSubscription :
38- """Async iterator subscription for receiving NATS messages.
39-
40- Returned by :meth:`Nats.subscribe` when no callback is provided.
41- Messages can be received using ``async for`` or by calling :meth:`next`
42- directly.
43- """
44-
45- def __aiter__ (self ) -> IteratorSubscription : ...
40+ def __aiter__ (self ) -> Self : ...
4641 def __anext__ (self ) -> Future [Message ]: ...
47- def next (self , timeout : float | timedelta | None = None ) -> Future [Message ]:
48- """Receive the next message from the subscription.
49-
50- :param timeout: maximum time to wait for a message in seconds
51- or as a timedelta, defaults to None (wait indefinitely).
52- :return: the next message.
53- :raises StopAsyncIteration: when the subscription is drained or
54- unsubscribed.
55- """
56-
5742 def unsubscribe (self , limit : int | None = None ) -> Future [None ]:
5843 """Unsubscribe from the subject.
5944
@@ -96,6 +81,22 @@ class Nats:
9681 access over a connection to one or more NATS servers.
9782 """
9883
84+ @property
85+ def addr (self ) -> list [str ]: ...
86+ @property
87+ def user_and_pass (self ) -> tuple [str , str ]: ...
88+ @property
89+ def nkey (self ) -> str | None : ...
90+ @property
91+ def token (self ) -> str | None : ...
92+ @property
93+ def custom_inbox_prefix (self ) -> str | None : ...
94+ @property
95+ def read_buffer_capacity (self ) -> int : ...
96+ @property
97+ def sender_capacity (self ) -> int : ...
98+ @property
99+ def max_reconnects (self ) -> int | None : ...
99100 def __new__ (
100101 cls ,
101102 / ,
0 commit comments