Class ServerDescription

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

Internal type, not meant to be directly instantiated

Properties

$clusterTime?: ClusterTime
address: string
arbiters: string[]
electionId: null | ObjectId
error: null | MongoError
hosts: string[]
iscryptd: boolean

Indicates server is a mongocryptd instance.

lastUpdateTime: number
lastWriteDate: number
logicalSessionTimeoutMinutes: null | number
maxBsonObjectSize: null | number

The max bson object size.

maxMessageSizeBytes: null | number

The max message size in bytes for the server.

maxWireVersion: number
maxWriteBatchSize: null | number

The max number of writes in a bulk write command.

me: null | string
minRoundTripTime: number

The minimum measurement of the last 10 measurements of roundTripTime that have been collected

minWireVersion: number
passives: string[]
primary: null | string
roundTripTime: number
setName: null | string
setVersion: null | number
tags: TagSet
topologyVersion: null | TopologyVersion

Accessors

  • get allHosts(): string[]
  • Returns string[]

  • get host(): string
  • Returns string

  • get isDataBearing(): boolean
  • Is this server data bearing

    Returns boolean

  • get isReadable(): boolean
  • Is this server available for reads

    Returns boolean

  • get isWritable(): boolean
  • Is this server available for writes

    Returns boolean

  • get port(): number
  • Returns number

Methods