dart_to_nats library

NATS Client for Dart applications

Classes

Client
A NATS client that handles connections to NATS servers and provides pub/sub functionality.
ConnectOption
Configuration options for connecting to a NATS server.
A class representing NATS message headers that can contain metadata about messages.
Info
Represents information about a NATS server received during connection.
Message<T>
A class representing a NATS message with typed payload data.
Nkeys
A class for managing NATS key pairs and cryptographic operations.
Nuid
A utility class for generating unique identifiers (NUIDs) for NATS messaging.
Subscription<T>
A subscription to a NATS subject that receives messages as a stream.

Enums

Status
Represents the current connection status of the NATS client.

Constants

PrefixByteAccount → const int
Version byte for encoded NATS Accounts (base32-encodes to 'A...')
PrefixByteCluster → const int
Version byte for encoded NATS Clusters (base32-encodes to 'C...')
PrefixByteOperator → const int
Version byte for encoded NATS Operators (base32-encodes to 'O...')
PrefixBytePrivate → const int
Version byte for encoded NATS Private keys (base32-encodes to 'P...')
PrefixByteSeed → const int
Version byte for encoded NATS Seeds (base32-encodes to 'S...')
PrefixByteServer → const int
Version byte for encoded NATS Servers (base32-encodes to 'N...')
PrefixByteUnknown → const int
Version byte for unknown prefixes (base32-encodes to 'X...')
PrefixByteUser → const int
Version byte for encoded NATS Users (base32-encodes to 'U...')

Functions

newInbox({String inboxPrefix = '_INBOX', bool secure = true}) String
Generates a unique inbox subject name for request-reply messaging.

Exceptions / Errors

NatsException
A custom exception class for NATS-related errors.
NkeysException
A custom exception class for NKEYS-related errors.