Skip to content

Commit 1305f92

Browse files
committed
Updated manager.py documentation to include missing delete function. Cleaned up parameters to render correctly
1 parent 7e7883e commit 1305f92

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

nats/js/manager.py

+12
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,8 @@ async def update_stream(
147147
async def delete_stream(self, name: str) -> bool:
148148
"""
149149
Delete a stream by name.
150+
151+
:param stream: The name of the stream from which the consumer should be deleted.
150152
"""
151153
resp = await self._api_request(
152154
f"{self._prefix}.STREAM.DELETE.{name}", timeout=self._timeout
@@ -263,6 +265,12 @@ async def add_consumer(
263265
return api.ConsumerInfo.from_response(resp)
264266

265267
async def delete_consumer(self, stream: str, consumer: str) -> bool:
268+
"""
269+
Delete a consumer from a given stream.
270+
271+
:param stream: The name of the stream from which the consumer should be deleted.
272+
:param consumer: The name of the consumer to be deleted.
273+
"""
266274
resp = await self._api_request(
267275
f"{self._prefix}.CONSUMER.DELETE.{stream}.{consumer}",
268276
b"",
@@ -278,6 +286,7 @@ async def consumers_info(
278286
"""
279287
consumers_info retrieves a list of consumers. Consumers list limit is 256 for more
280288
consider to use offset
289+
281290
:param stream: stream to get consumers
282291
:param offset: consumers list offset
283292
"""
@@ -386,6 +395,9 @@ def _lift_msg_to_raw_msg(self, msg) -> api.RawStreamMsg:
386395
async def delete_msg(self, stream_name: str, seq: int) -> bool:
387396
"""
388397
delete_msg retrieves a message from a stream based on the sequence ID.
398+
399+
:param stream_name: The name of the stream from which the message should be deleted.
400+
:param seq: The sequence id to delete
389401
"""
390402
req_subject = f"{self._prefix}.STREAM.MSG.DELETE.{stream_name}"
391403
req = {"seq": seq}

0 commit comments

Comments
 (0)