ServerDescription

public struct ServerDescription
extension ServerDescription: Equatable

A struct describing a mongod or mongos process.

  • The possible types for a server.

    See more

    Declaration

    Swift

    public enum ServerType : String, Equatable
  • The hostname or IP and the port number that the client connects to. Note that this is not the server’s ismaster.me field, in the case that the server reports an address different from the address the client uses.

    Declaration

    Swift

    public let address: Address
  • The duration in milliseconds of the server’s last ismaster call.

    Declaration

    Swift

    public let roundTripTime: Int?
  • The date of the most recent write operation seen by this server.

    Declaration

    Swift

    public var lastWriteDate: Date?
  • The type of this server.

    Declaration

    Swift

    public let type: ServerType
  • The minimum wire protocol version supported by the server.

    Declaration

    Swift

    public let minWireVersion: Int
  • The maximum wire protocol version supported by the server.

    Declaration

    Swift

    public let maxWireVersion: Int
  • me

    The hostname or IP and the port number that this server was configured with in the replica set.

    Declaration

    Swift

    public let me: Address?
  • This server’s opinion of the replica set’s hosts, if any.

    Declaration

    Swift

    public let hosts: [Address]
  • This server’s opinion of the replica set’s arbiters, if any.

    Declaration

    Swift

    public let arbiters: [Address]
  • “Passives” are priority-zero replica set members that cannot become primary. The client treats them precisely the same as other members.

    Declaration

    Swift

    public let passives: [Address]
  • Tags for this server.

    Declaration

    Swift

    public let tags: [String : String]
  • The replica set name.

    Declaration

    Swift

    public let setName: String?
  • The replica set version.

    Declaration

    Swift

    public let setVersion: Int?
  • The election ID where this server was elected, if this is a replica set member that believes it is primary.

    Declaration

    Swift

    public let electionId: ObjectId?
  • This server’s opinion of who the primary is.

    Declaration

    Swift

    public let primary: Address?
  • When this server was last checked.

    Declaration

    Swift

    public let lastUpdateTime: Date
  • The logicalSessionTimeoutMinutes value for this server.

    Declaration

    Swift

    public let logicalSessionTimeoutMinutes: Int?
  • Declaration

    Swift

    public static func == (lhs: ServerDescription, rhs: ServerDescription) -> Bool