maestro.nats package#

Submodules#

maestro.nats.nats module#

class maestro.nats.nats.NATSSession[source]#

Bases: object

async add_or_update_stream(name: str, subjects: list[str]) StreamInfo[source]#
async delete_bucket(name: str) None[source]#
async delete_stream(name: str) bool[source]#
lock() AsyncGenerator[None, None][source]#

This is a context manager that creates a lock in a NATS Key/Value Store bucket and deletes it when the context is exited.

async publish(subject: str, data: bytes, stream: str | None = None) PubAck[source]#
async run_forever() None[source]#
async start() None[source]#
async stop() None[source]#
async subscribe(stream: str, subject: str, cb: Callable[[...], Any] | None, *, durable: str | None = None, config: ConsumerConfig | dict | None = None) PullSubscription[source]#