ServerDescription
public struct ServerDescription
extension ServerDescription: Equatable
A struct describing a mongod or mongos process.
-
The possible types for a server.
See moreDeclaration
Swift
public struct ServerType : RawRepresentable, Equatable, Decodable
-
The hostname or IP and the port number that the client connects to. Note that this is not the “me” field in the server’s hello or legacy hello response, in the case that the server reports an address different from the address the client uses.
Declaration
Swift
public let address: ServerAddress
-
The duration in milliseconds of the server’s last “hello” 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
-
The hostname or IP and the port number that this server was configured with in the replica set.
Declaration
Swift
public let me: ServerAddress?
-
This server’s opinion of the replica set’s hosts, if any.
Declaration
Swift
public let hosts: [ServerAddress]
-
This server’s opinion of the replica set’s arbiters, if any.
Declaration
Swift
public let arbiters: [ServerAddress]
-
“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: [ServerAddress]
-
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: BSONObjectID?
-
This server’s opinion of who the primary is.
Declaration
Swift
public let primary: ServerAddress?
-
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