mirror of
https://github.com/swift-server/RediStack.git
synced 2026-05-03 07:32:28 +00:00
31 lines
973 B
Swift
31 lines
973 B
Swift
//===----------------------------------------------------------------------===//
|
|
//
|
|
// This source file is part of the RediStack open source project
|
|
//
|
|
// Copyright (c) 2019-2020 RediStack project authors
|
|
// Licensed under Apache License v2.0
|
|
//
|
|
// See LICENSE.txt for license information
|
|
// See CONTRIBUTORS.txt for the list of RediStack project authors
|
|
//
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
import Foundation
|
|
import NIO
|
|
import RediStack
|
|
|
|
extension RedisConnection.Configuration {
|
|
/// A default hostname of `localhost` to try and connect to Redis at.
|
|
public static let defaultHostname = "localhost"
|
|
|
|
public init(
|
|
host: String = RedisConnection.Configuration.defaultHostname,
|
|
port: Int = RedisConnection.Configuration.defaultPort,
|
|
password: String? = nil
|
|
) throws {
|
|
try self.init(hostname: host, port: port, password: password)
|
|
}
|
|
}
|