API 参考
    正在准备搜索索引...

    The client's view of a single server, based on the most recent hello outcome.

    Internal type, not meant to be directly instantiated

    索引
    $clusterTime?: ClusterTime
    address: string
    arbiters: string[]
    electionId: BSON.ObjectId | null
    error: MongoError | null
    hosts: string[]
    lastUpdateTime: number
    lastWriteDate: number
    logicalSessionTimeoutMinutes: number | null
    maxWireVersion: number
    me: string | null
    minWireVersion: number
    passives: string[]
    primary: string | null
    roundTripTime: number
    setName: string | null
    setVersion: number | null
    tags: TagSet
    topologyVersion: TopologyVersion | null
    • get allHosts(): string[]

      返回 string[]

    • get host(): string

      返回 string

    • get hostAddress(): HostAddress

      返回 HostAddress

    • get isDataBearing(): boolean

      Is this server data bearing

      返回 boolean

    • get isReadable(): boolean

      Is this server available for reads

      返回 boolean

    • get isWritable(): boolean

      Is this server available for writes

      返回 boolean

    • get port(): number

      返回 number

    • Determines if another ServerDescription is equal to this one per the rules defined in the spec

      参数

      返回 boolean