ServerInfo.fromMap constructor
Implementation
factory ServerInfo.fromMap(Map<String, String> map) {
return ServerInfo(
redisVersion: map['redis_version'] ?? '',
redisGitSha1: map['redis_git_sha1'] ?? '',
redisGitDirty: map['redis_git_dirty'] == '1',
redisBuildId: map['redis_build_id'] ?? '',
redisMode: map['redis_mode'] ?? '',
os: map['os'] ?? '',
archBits: int.parse(map['arch_bits'] ?? '0'),
multiplexingApi: map['multiplexing_api'] ?? '',
atomicvarApi: map['atomicvar_api'] ?? '',
gccVersion: map['gcc_version'] ?? '',
processId: int.parse(map['process_id'] ?? '0'),
runId: map['run_id'] ?? '',
tcpPort: int.parse(map['tcp_port'] ?? '0'),
uptimeInSeconds: int.parse(map['uptime_in_seconds'] ?? '0'),
uptimeInDays: int.parse(map['uptime_in_days'] ?? '0'),
hz: int.parse(map['hz'] ?? '0'),
lruClock: int.parse(map['lru_clock'] ?? '0'),
executable: map['executable'] ?? '',
configFile: map['config_file'] ?? '',
);
}