MongoHost

public struct MongoHost: Equatable, ExpressibleByStringLiteral

The location of a Mongo server - i.e. server name and port number

  • host address

    Declaration

    Swift

    public let hostname: String
  • mongod port

    Declaration

    Swift

    public let port: UInt16
  • Os this host online

    Declaration

    Swift

    public internal(set) var online = false
  • Is this host a primary node

    Declaration

    Swift

    public internal(set) var isPrimary = false
  • Creates a new Host object that specifies the location of this mongod instance

    Declaration

    Swift

    public init(hostname: String, port: UInt16 = 27017)
  • Creates a new Host object from a string

    Declaration

    Swift

    public init(stringLiteral value: String)
  • Creates a new Host object from a string

    Declaration

    Swift

    public init(unicodeScalarLiteral value: String)
  • Creates a new Host object from a string

    Declaration

    Swift

    public init(extendedGraphemeClusterLiteral value: String)
  • Compares two hosts to be equal

    Declaration

    Swift

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