Class CloudConnectionPool

Hierarchy

Constructors

Properties

Connection: typeof Connection
_agent: AgentOptions
_proxy: string | URL
_ssl: SecureContextOptions
auth: BasicAuth | ApiKeyAuth
cloudConnection: Connection
connections: Connection[]
emit: ((event: string | symbol, ...args: any[]) => boolean)

Type declaration

    • (event: string | symbol, ...args: any[]): boolean
    • Parameters

      • event: string | symbol
      • Rest ...args: any[]

      Returns boolean

size: number

Methods

  • Returns an alive connection if present, otherwise returns a dead connection. By default it filters the master only nodes. It uses the selector to choose which connection return.

    Returns

    connection

    Returns Connection

  • Transforms the nodes objects to a host object.

    Returns

    hosts

    Parameters

    • nodes: any
    • protocol: string

    Returns any[]

  • Transforms an url string to a host object

    Returns

    host

    Parameters

    • url: string

    Returns { url: URL }

    • url: URL

Generated using TypeDoc