edgeport - v1.0.3
    Preparing search index...

    Interface NatsConnectOptions

    Options for connect.

    1.0.0

    interface NatsConnectOptions {
        creds?: string;
        hostname: string;
        jwt?: string;
        name?: string;
        nkeySeed?: string;
        password?: string;
        port?: number;
        timeoutMs?: number;
        tls?: "off" | "starttls" | "implicit";
        token?: string;
        username?: string;
    }
    Index
    creds?: string

    Full contents of a NATS .creds file (user JWT + nkey seed) for JWT auth.

    hostname: string

    Remote NATS host.

    jwt?: string

    User JWT for JWT auth (pair with nkeySeed); ignored if creds is set.

    name?: string

    Client name advertised in CONNECT; defaults to edgeport.

    nkeySeed?: string

    Base32 seed string (S...) for nkey auth; signs the server nonce.

    password?: string

    Password for user/password auth.

    port?: number

    Remote port; defaults to 4222.

    timeoutMs?: number

    Read deadline in milliseconds for the connect handshake.

    tls?: "off" | "starttls" | "implicit"

    Transport security:

    • 'off': plaintext.
    • 'implicit': TLS from the first byte.
    • 'starttls': plaintext, upgraded to TLS right after the server INFO.

    Defaults to 'starttls' when the server advertises tls_required, otherwise 'off'.

    token?: string

    Bearer token auth (auth_token).

    username?: string

    Username for user/password auth.