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: null | ObjectId
    error: null | MongoError
    hosts: string[]
    lastUpdateTime: number
    lastWriteDate: number
    logicalSessionTimeoutMinutes: null | number
    maxWireVersion: number
    me: null | string
    minWireVersion: number
    passives: string[]
    primary: null | string
    roundTripTime: number
    setName: null | string
    setVersion: null | number
    tags: TagSet
    topologyVersion: null | TopologyVersion

    访问器

    • 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