TopologyDescription
public struct TopologyDescription : Equatable
A struct describing the state of a MongoDB deployment: its type (standalone, replica set, or sharded), which servers are up, what type of servers they are, which is primary, and so on.
-
The possible types for a topology.
See moreDeclaration
Swift
public struct TopologyType : RawRepresentable, Equatable, CustomStringConvertible, Decodable -
The type of this topology.
Declaration
Swift
public let type: TopologyType -
The replica set name.
Declaration
Swift
public var setName: String? { get } -
The servers comprising this topology.
Declaration
Swift
public let servers: [ServerDescription] -
The logicalSessionTimeoutMinutes value for this topology. This value is the minimum of the
logicalSessionTimeoutMinutesvalues across all the servers inservers, ornilif any of them arenil.Declaration
Swift
public var logicalSessionTimeoutMinutes: Int? { get } -
Returns
trueif the topology has a readable server available, andfalseotherwise.Declaration
Swift
public func hasReadableServer() -> Bool -
Returns
trueif the topology has a writable server available, andfalseotherwise.Declaration
Swift
public func hasWritableServer() -> Bool
View on GitHub
Install in Dash
TopologyDescription Structure Reference