RedisInfoServer

public struct RedisInfoServer

A struct that contains a subset of the server information returned by the Redis INFO command in a parsed and more consumable fashion.

  • The version of Redis server

    Declaration

    Swift

    public let redis_version: String
  • The mode of the Redis server

    Declaration

    Swift

    public let redis_mode: String
  • os

    The O/S the Redis server is running on.

    Declaration

    Swift

    public let os: String
  • The number of bits in the architecture (32 or 64) of the hardware the Redis server is running on.

    Declaration

    Swift

    public let arch_bits: Int
  • The process id of the Redis server.

    Declaration

    Swift

    public let process_id: Int
  • The port the Redis server is listening on.

    Declaration

    Swift

    public let tcp_port: Int
  • The amount of time, in seconds, the Redis server has been up.

    Declaration

    Swift

    public let uptime_in_seconds: Int
  • The amount of time, in days, the Redis server has been up.

    Declaration

    Swift

    public let uptime_in_days: Int
  • Check if the Redis server is compatable with a certain Major.Minor version of Redis

    Parameter

    Parameter major: The major portion of the Redis server version to compare against.

    Parameter

    Parameter minor: The minor portion of the Redis server version to compare against.

    Returns

    true if the Redis server is compatable with the specified major and minor Redis version number.

    Declaration

    Swift

    public func checkVersionCompatible(major: Int, minor: Int=0) -> Bool

    Parameters

    major

    The major portion of the Redis server version to compare against.

    minor

    The minor portion of the Redis server version to compare against.

    Return Value

    true if the Redis server is compatable with the specified major and minor Redis version number.

  • Check if the Redis server is compatable with a certain Major.Minor.Micro version of Redis

    Parameter

    Parameter major: The major portion of the Redis server version to compare against.

    Parameter

    Parameter minor: The minor portion of the Redis server version to compare against.

    Parameter

    Parameter micro: The micro portion of the Redis server version to compare against.

    Returns

    true if the Redis server is compatable with the specified major, minor, and micro Redis version number.

    Declaration

    Swift

    public func checkVersionCompatible(major: Int, minor: Int=0, micro: Int) -> Bool

    Parameters

    major

    The major portion of the Redis server version to compare against.

    minor

    The minor portion of the Redis server version to compare against.

    micro

    The micro portion of the Redis server version to compare against.

    Return Value

    true if the Redis server is compatable with the specified major, minor, and micro Redis version number.