mirror of
https://github.com/swift-server/RediStack.git
synced 2026-06-02 07:37:33 +00:00
Merge branch '61-rebrand' into 'master'
61 -- Rebrand from `RedisNIO` to `RediStack` Closes #61 See merge request Mordil/swift-redis-nio-client!73
This commit is contained in:
+3
-3
@@ -1,10 +1,10 @@
|
||||
# Code of Conduct
|
||||
To be a truly great community, RedisNIO needs to welcome developers from all walks of life,
|
||||
To be a truly great community, RediStack needs to welcome developers from all walks of life,
|
||||
with different backgrounds, and with a wide range of experience. A diverse and friendly
|
||||
community will have more great ideas, more unique perspectives, and produce more great
|
||||
code. We will work diligently to make the RedisNIO community welcoming to everyone.
|
||||
code. We will work diligently to make the RediStack community welcoming to everyone.
|
||||
|
||||
To give clarity of what is expected of our members, RedisNIO has adopted the code of conduct
|
||||
To give clarity of what is expected of our members, RediStack has adopted the code of conduct
|
||||
defined by [contributor-covenant.org](https://www.contributor-covenant.org). This document is used across many open source
|
||||
communities, and we think it articulates our values well. The full text is copied below:
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ that your contributions are licensed under the [Apache 2.0 license](https://www.
|
||||
|
||||
Please ensure to specify the following:
|
||||
|
||||
* RedisNIO commit hash
|
||||
* **RediStack** commit hash
|
||||
* Simplest possible steps to reproduce
|
||||
* A pull request with a failing test case is preferred, but it's just as fine to write it in the issue description
|
||||
* Environment Information
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
For the purpose of tracking copyright, this is the list of individuals and
|
||||
organizations who have contributed source code to RedisNIO.
|
||||
organizations who have contributed source code to RediStack.
|
||||
|
||||
For employees of an organization/company where the copyright of work done
|
||||
by employees of that company is held by the company itself, only the company
|
||||
|
||||
+4
-4
@@ -1,14 +1,14 @@
|
||||
|
||||
The RedisNIO Project
|
||||
The RediStack Project
|
||||
====================
|
||||
|
||||
Please visit the RedisNIO web site for more information:
|
||||
Please visit the RediStack web site for more information:
|
||||
|
||||
* https://github.com/mordil/nio-redis
|
||||
|
||||
Copyright 2019 The RedisNIO Project
|
||||
Copyright 2019 The RediStack Project
|
||||
|
||||
The RedisNIO Project licenses this file to you under the Apache License,
|
||||
The RediStack Project licenses this file to you under the Apache License,
|
||||
version 2.0 (the "License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at:
|
||||
|
||||
|
||||
+8
-8
@@ -1,13 +1,13 @@
|
||||
// swift-tools-version:5.0
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// This source file is part of the RedisNIO open source project
|
||||
// This source file is part of the RediStack open source project
|
||||
//
|
||||
// Copyright (c) 2019 RedisNIO project authors
|
||||
// Copyright (c) 2019 RediStack project authors
|
||||
// Licensed under Apache License v2.0
|
||||
//
|
||||
// See LICENSE.txt for license information
|
||||
// See CONTRIBUTORS.txt for the list of RedisNIO project authors
|
||||
// See CONTRIBUTORS.txt for the list of RediStack project authors
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
@@ -16,9 +16,9 @@
|
||||
import PackageDescription
|
||||
|
||||
let package = Package(
|
||||
name: "swift-redis-nio-client",
|
||||
name: "redi-stack",
|
||||
products: [
|
||||
.library(name: "RedisNIO", targets: ["RedisNIO"])
|
||||
.library(name: "RediStack", targets: ["RediStack"])
|
||||
],
|
||||
dependencies: [
|
||||
.package(url: "https://github.com/apple/swift-log.git", from: "1.0.0"),
|
||||
@@ -26,8 +26,8 @@ let package = Package(
|
||||
.package(url: "https://github.com/apple/swift-nio.git", from: "2.0.0")
|
||||
],
|
||||
targets: [
|
||||
.target(name: "RedisNIO", dependencies: ["NIO", "Logging", "Metrics"]),
|
||||
.target(name: "RedisNIOTestUtils", dependencies: ["NIO", "RedisNIO"]),
|
||||
.testTarget(name: "RedisNIOTests", dependencies: ["RedisNIO", "NIO", "RedisNIOTestUtils"])
|
||||
.target(name: "RediStack", dependencies: ["NIO", "Logging", "Metrics"]),
|
||||
.target(name: "RediStackTestUtils", dependencies: ["NIO", "RediStack"]),
|
||||
.testTarget(name: "RediStackTests", dependencies: ["RediStack", "NIO", "RediStackTestUtils"])
|
||||
]
|
||||
)
|
||||
|
||||
@@ -6,21 +6,21 @@
|
||||
[](https://swift.org)
|
||||
[](https://redis.io/download)
|
||||
|
||||
# Swift Redis NIO Client
|
||||
# Swift RediStack
|
||||
|
||||
A non-blocking Swift client for [Redis](https://redis.io/) built on top of [SwiftNIO](https://github.com/apple/swift-nio).
|
||||
|
||||
This package defines everything you need to work with Redis through the [**Re**dis **S**eralization **P**rotocol (RESP)](https://redis.io/topics/protocol).
|
||||
|
||||
**RedisNIO** is part of the [Swift on Server Working Group](https://github.com/swift-server/sswg) ecosystem.
|
||||
**RediStack** is part of the [Swift on Server Working Group](https://github.com/swift-server/sswg) ecosystem.
|
||||
|
||||
| Proposal | Pitch | Discussion | Review | Vote |
|
||||
|----------|-------|------------|--------|------|
|
||||
| [SSWG-0004](https://github.com/swift-server/sswg/blob/master/proposals/0004-nio-redis.md) | [2019-01-07](https://forums.swift.org/t/swiftnio-redis-client/19325) | [2019-04-01](https://forums.swift.org/t/discussion-nioredis-nio-based-redis-driver/22455) | **TBD** | **TBD** |
|
||||
| [SSWG-0004](https://github.com/swift-server/sswg/blob/master/proposals/0004-nio-redis.md) | [2019-01-07](https://forums.swift.org/t/swiftnio-redis-client/19325) | [2019-04-01](https://forums.swift.org/t/discussion-nioredis-nio-based-redis-driver/22455) | [2019-06-09](https://forums.swift.org/t/feedback-redisnio-a-nio-based-redis-driver/25521) | [2019-06-27](https://forums.swift.org/t/june-27th-2019/26580) |
|
||||
|
||||
## :package: Installation
|
||||
|
||||
To install **RedisNIO**, just add the package as a dependency in your [**Package.swift**](https://github.com/apple/swift-package-manager/blob/master/Documentation/PackageDescriptionV4.md#dependencies)
|
||||
To install **RediStack**, just add the package as a dependency in your [**Package.swift**](https://github.com/apple/swift-package-manager/blob/master/Documentation/PackageDescriptionV4.md#dependencies)
|
||||
|
||||
```swift
|
||||
dependencies: [
|
||||
@@ -32,11 +32,11 @@ and run the following command: `swift package resolve`
|
||||
|
||||
## :zap: Getting Started
|
||||
|
||||
**RedisNIO** is quick to use - all you need is an [`EventLoop`](https://apple.github.io/swift-nio/docs/current/NIO/Protocols/EventLoop.html) from **SwiftNIO**.
|
||||
**RediStack** is quick to use - all you need is an [`EventLoop`](https://apple.github.io/swift-nio/docs/current/NIO/Protocols/EventLoop.html) from **SwiftNIO**.
|
||||
|
||||
```swift
|
||||
import NIO
|
||||
import RedisNIO
|
||||
import RediStack
|
||||
|
||||
let eventLoop: EventLoop = ...
|
||||
let connection = RedisConnection.connect(
|
||||
@@ -59,7 +59,7 @@ The latest version's docs are always available at https://mordil.gitlab.io/swift
|
||||
|
||||
## :construction: Contributing
|
||||
|
||||
Check out [CONTRIBUTING.md](CONTRIBUTING.md) for more information on how to help with **RedisNIO**.
|
||||
Check out [CONTRIBUTING.md](CONTRIBUTING.md) for more information on how to help with **RediStack**.
|
||||
|
||||
It is highly recommended to use [Docker](https://docker.com) to install Redis locally.
|
||||
|
||||
|
||||
+3
-3
@@ -1,12 +1,12 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// This source file is part of the RedisNIO open source project
|
||||
// This source file is part of the RediStack open source project
|
||||
//
|
||||
// Copyright (c) 2019 RedisNIO project authors
|
||||
// Copyright (c) 2019 RediStack project authors
|
||||
// Licensed under Apache License v2.0
|
||||
//
|
||||
// See LICENSE.txt for license information
|
||||
// See CONTRIBUTORS.txt for the list of RedisNIO project authors
|
||||
// See CONTRIBUTORS.txt for the list of RediStack project authors
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
+4
-4
@@ -1,12 +1,12 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// This source file is part of the RedisNIO open source project
|
||||
// This source file is part of the RediStack open source project
|
||||
//
|
||||
// Copyright (c) 2019 RedisNIO project authors
|
||||
// Copyright (c) 2019 RediStack project authors
|
||||
// Licensed under Apache License v2.0
|
||||
//
|
||||
// See LICENSE.txt for license information
|
||||
// See CONTRIBUTORS.txt for the list of RedisNIO project authors
|
||||
// See CONTRIBUTORS.txt for the list of RediStack project authors
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
@@ -54,7 +54,7 @@ public final class RedisCommandHandler {
|
||||
/// and don't want the buffer to resize, you shouldn't need to set this parameter.
|
||||
/// - logger: The `Logging.Logger` instance to use.
|
||||
/// The logger will have a `Foundation.UUID` value attached as metadata to uniquely identify this instance.
|
||||
public init(initialQueueCapacity: Int = 3, logger: Logger = Logger(label: "RedisNIO.CommandHandler")) {
|
||||
public init(initialQueueCapacity: Int = 3, logger: Logger = Logger(label: "RediStack.CommandHandler")) {
|
||||
self.commandResponseQueue = CircularBuffer(initialCapacity: initialQueueCapacity)
|
||||
self.logger = logger
|
||||
self.logger[metadataKey: "CommandHandler"] = "\(UUID())"
|
||||
+4
-4
@@ -1,12 +1,12 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// This source file is part of the RedisNIO open source project
|
||||
// This source file is part of the RediStack open source project
|
||||
//
|
||||
// Copyright (c) 2019 RedisNIO project authors
|
||||
// Copyright (c) 2019 RediStack project authors
|
||||
// Licensed under Apache License v2.0
|
||||
//
|
||||
// See LICENSE.txt for license information
|
||||
// See CONTRIBUTORS.txt for the list of RedisNIO project authors
|
||||
// See CONTRIBUTORS.txt for the list of RediStack project authors
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
@@ -25,7 +25,7 @@ public final class RedisMessageEncoder: MessageToByteEncoder {
|
||||
|
||||
private let logger: Logger
|
||||
|
||||
public init(logger: Logger = Logger(label: "RedisNIO.RedisMessageEncoder")) {
|
||||
public init(logger: Logger = Logger(label: "RediStack.RedisMessageEncoder")) {
|
||||
self.logger = logger
|
||||
}
|
||||
|
||||
+3
-3
@@ -1,12 +1,12 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// This source file is part of the RedisNIO open source project
|
||||
// This source file is part of the RediStack open source project
|
||||
//
|
||||
// Copyright (c) 2019 RedisNIO project authors
|
||||
// Copyright (c) 2019 RediStack project authors
|
||||
// Licensed under Apache License v2.0
|
||||
//
|
||||
// See LICENSE.txt for license information
|
||||
// See CONTRIBUTORS.txt for the list of RedisNIO project authors
|
||||
// See CONTRIBUTORS.txt for the list of RediStack project authors
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
+3
-3
@@ -1,12 +1,12 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// This source file is part of the RedisNIO open source project
|
||||
// This source file is part of the RediStack open source project
|
||||
//
|
||||
// Copyright (c) 2019 RedisNIO project authors
|
||||
// Copyright (c) 2019 RediStack project authors
|
||||
// Licensed under Apache License v2.0
|
||||
//
|
||||
// See LICENSE.txt for license information
|
||||
// See CONTRIBUTORS.txt for the list of RedisNIO project authors
|
||||
// See CONTRIBUTORS.txt for the list of RediStack project authors
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
+3
-3
@@ -1,12 +1,12 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// This source file is part of the RedisNIO open source project
|
||||
// This source file is part of the RediStack open source project
|
||||
//
|
||||
// Copyright (c) 2019 RedisNIO project authors
|
||||
// Copyright (c) 2019 RediStack project authors
|
||||
// Licensed under Apache License v2.0
|
||||
//
|
||||
// See LICENSE.txt for license information
|
||||
// See CONTRIBUTORS.txt for the list of RedisNIO project authors
|
||||
// See CONTRIBUTORS.txt for the list of RediStack project authors
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
+3
-3
@@ -1,12 +1,12 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// This source file is part of the RedisNIO open source project
|
||||
// This source file is part of the RediStack open source project
|
||||
//
|
||||
// Copyright (c) 2019 RedisNIO project authors
|
||||
// Copyright (c) 2019 RediStack project authors
|
||||
// Licensed under Apache License v2.0
|
||||
//
|
||||
// See LICENSE.txt for license information
|
||||
// See CONTRIBUTORS.txt for the list of RedisNIO project authors
|
||||
// See CONTRIBUTORS.txt for the list of RediStack project authors
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
+3
-3
@@ -1,12 +1,12 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// This source file is part of the RedisNIO open source project
|
||||
// This source file is part of the RediStack open source project
|
||||
//
|
||||
// Copyright (c) 2019 RedisNIO project authors
|
||||
// Copyright (c) 2019 RediStack project authors
|
||||
// Licensed under Apache License v2.0
|
||||
//
|
||||
// See LICENSE.txt for license information
|
||||
// See CONTRIBUTORS.txt for the list of RedisNIO project authors
|
||||
// See CONTRIBUTORS.txt for the list of RediStack project authors
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
+3
-3
@@ -1,12 +1,12 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// This source file is part of the RedisNIO open source project
|
||||
// This source file is part of the RediStack open source project
|
||||
//
|
||||
// Copyright (c) 2019 RedisNIO project authors
|
||||
// Copyright (c) 2019 RediStack project authors
|
||||
// Licensed under Apache License v2.0
|
||||
//
|
||||
// See LICENSE.txt for license information
|
||||
// See CONTRIBUTORS.txt for the list of RedisNIO project authors
|
||||
// See CONTRIBUTORS.txt for the list of RediStack project authors
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
+3
-3
@@ -1,12 +1,12 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// This source file is part of the RedisNIO open source project
|
||||
// This source file is part of the RediStack open source project
|
||||
//
|
||||
// Copyright (c) 2019 RedisNIO project authors
|
||||
// Copyright (c) 2019 RediStack project authors
|
||||
// Licensed under Apache License v2.0
|
||||
//
|
||||
// See LICENSE.txt for license information
|
||||
// See CONTRIBUTORS.txt for the list of RedisNIO project authors
|
||||
// See CONTRIBUTORS.txt for the list of RediStack project authors
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
+6
-6
@@ -1,12 +1,12 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// This source file is part of the RedisNIO open source project
|
||||
// This source file is part of the RediStack open source project
|
||||
//
|
||||
// Copyright (c) 2019 RedisNIO project authors
|
||||
// Copyright (c) 2019 RediStack project authors
|
||||
// Licensed under Apache License v2.0
|
||||
//
|
||||
// See LICENSE.txt for license information
|
||||
// See CONTRIBUTORS.txt for the list of RedisNIO project authors
|
||||
// See CONTRIBUTORS.txt for the list of RediStack project authors
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
@@ -44,9 +44,9 @@ extension Channel {
|
||||
/// - Returns: An `EventLoopFuture` that resolves after all handlers have been added to the pipeline.
|
||||
public func addBaseRedisHandlers() -> EventLoopFuture<Void> {
|
||||
let handlers: [(ChannelHandler, name: String)] = [
|
||||
(MessageToByteHandler(RedisMessageEncoder()), "RedisNIO.OutgoingHandler"),
|
||||
(ByteToMessageHandler(RedisByteDecoder()), "RedisNIO.IncomingHandler"),
|
||||
(RedisCommandHandler(), "RedisNIO.CommandHandler")
|
||||
(MessageToByteHandler(RedisMessageEncoder()), "RediStack.OutgoingHandler"),
|
||||
(ByteToMessageHandler(RedisByteDecoder()), "RediStack.IncomingHandler"),
|
||||
(RedisCommandHandler(), "RediStack.CommandHandler")
|
||||
]
|
||||
return .andAllSucceed(
|
||||
handlers.map { self.pipeline.addHandler($0, name: $1) },
|
||||
+3
-3
@@ -1,12 +1,12 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// This source file is part of the RedisNIO open source project
|
||||
// This source file is part of the RediStack open source project
|
||||
//
|
||||
// Copyright (c) 2019 RedisNIO project authors
|
||||
// Copyright (c) 2019 RediStack project authors
|
||||
// Licensed under Apache License v2.0
|
||||
//
|
||||
// See LICENSE.txt for license information
|
||||
// See CONTRIBUTORS.txt for the list of RedisNIO project authors
|
||||
// See CONTRIBUTORS.txt for the list of RediStack project authors
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
@@ -1,12 +1,12 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// This source file is part of the RedisNIO open source project
|
||||
// This source file is part of the RediStack open source project
|
||||
//
|
||||
// Copyright (c) 2019 RedisNIO project authors
|
||||
// Copyright (c) 2019 RediStack project authors
|
||||
// Licensed under Apache License v2.0
|
||||
//
|
||||
// See LICENSE.txt for license information
|
||||
// See CONTRIBUTORS.txt for the list of RedisNIO project authors
|
||||
// See CONTRIBUTORS.txt for the list of RediStack project authors
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
+3
-3
@@ -1,12 +1,12 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// This source file is part of the RedisNIO open source project
|
||||
// This source file is part of the RediStack open source project
|
||||
//
|
||||
// Copyright (c) 2019 RedisNIO project authors
|
||||
// Copyright (c) 2019 RediStack project authors
|
||||
// Licensed under Apache License v2.0
|
||||
//
|
||||
// See LICENSE.txt for license information
|
||||
// See CONTRIBUTORS.txt for the list of RedisNIO project authors
|
||||
// See CONTRIBUTORS.txt for the list of RediStack project authors
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
@@ -1,12 +1,12 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// This source file is part of the RedisNIO open source project
|
||||
// This source file is part of the RediStack open source project
|
||||
//
|
||||
// Copyright (c) 2019 RedisNIO project authors
|
||||
// Copyright (c) 2019 RediStack project authors
|
||||
// Licensed under Apache License v2.0
|
||||
//
|
||||
// See LICENSE.txt for license information
|
||||
// See CONTRIBUTORS.txt for the list of RedisNIO project authors
|
||||
// See CONTRIBUTORS.txt for the list of RediStack project authors
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
@@ -1,12 +1,12 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// This source file is part of the RedisNIO open source project
|
||||
// This source file is part of the RediStack open source project
|
||||
//
|
||||
// Copyright (c) 2019 RedisNIO project authors
|
||||
// Copyright (c) 2019 RediStack project authors
|
||||
// Licensed under Apache License v2.0
|
||||
//
|
||||
// See LICENSE.txt for license information
|
||||
// See CONTRIBUTORS.txt for the list of RedisNIO project authors
|
||||
// See CONTRIBUTORS.txt for the list of RediStack project authors
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
@@ -62,7 +62,7 @@ extension RedisConnection {
|
||||
to socket: SocketAddress,
|
||||
on eventLoop: EventLoop,
|
||||
password: String? = nil,
|
||||
logger: Logger = Logger(label: "RedisNIO.RedisConnection"),
|
||||
logger: Logger = Logger(label: "RediStack.RedisConnection"),
|
||||
tcpClient: ClientBootstrap? = nil
|
||||
) -> EventLoopFuture<RedisConnection> {
|
||||
let client = tcpClient ?? ClientBootstrap.makeRedisTCPClient(group: eventLoop)
|
||||
@@ -1,12 +1,12 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// This source file is part of the RedisNIO open source project
|
||||
// This source file is part of the RediStack open source project
|
||||
//
|
||||
// Copyright (c) 2019 RedisNIO project authors
|
||||
// Copyright (c) 2019 RediStack project authors
|
||||
// Licensed under Apache License v2.0
|
||||
//
|
||||
// See LICENSE.txt for license information
|
||||
// See CONTRIBUTORS.txt for the list of RedisNIO project authors
|
||||
// See CONTRIBUTORS.txt for the list of RediStack project authors
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
@@ -32,7 +32,7 @@ public enum RedisClientError: LocalizedError {
|
||||
case let .failedRESPConversion(type): message = "Failed to convert RESP to \(type)"
|
||||
case let .assertionFailure(text): message = text
|
||||
}
|
||||
return "RedisNIO: \(message)"
|
||||
return "RediStack: \(message)"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// This source file is part of the RedisNIO open source project
|
||||
// This source file is part of the RediStack open source project
|
||||
//
|
||||
// Copyright (c) 2019 RedisNIO project authors
|
||||
// Copyright (c) 2019 RediStack project authors
|
||||
// Licensed under Apache License v2.0
|
||||
//
|
||||
// See LICENSE.txt for license information
|
||||
// See CONTRIBUTORS.txt for the list of RedisNIO project authors
|
||||
// See CONTRIBUTORS.txt for the list of RediStack project authors
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
@@ -25,7 +25,7 @@ public struct RedisMetrics {
|
||||
/// An enumeration of all the labels used by the Redis library for various `Metrics` data points.
|
||||
///
|
||||
/// Each is backed by a raw string, and this type is `CustomStringConvertible` to receive a
|
||||
/// namespaced description in the form of `"RedisNIO.<rawValue>"`.
|
||||
/// namespaced description in the form of `"RediStack.<rawValue>"`.
|
||||
public enum Label: String, CustomStringConvertible {
|
||||
case totalConnectionCount
|
||||
case activeConnectionCount
|
||||
@@ -34,7 +34,7 @@ public struct RedisMetrics {
|
||||
case commandRoundTripTime
|
||||
|
||||
public var description: String {
|
||||
return "RedisNIO.\(self.rawValue)"
|
||||
return "RediStack.\(self.rawValue)"
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -1,12 +1,12 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// This source file is part of the RedisNIO open source project
|
||||
// This source file is part of the RediStack open source project
|
||||
//
|
||||
// Copyright (c) 2019 RedisNIO project authors
|
||||
// Copyright (c) 2019 RediStack project authors
|
||||
// Licensed under Apache License v2.0
|
||||
//
|
||||
// See LICENSE.txt for license information
|
||||
// See CONTRIBUTORS.txt for the list of RedisNIO project authors
|
||||
// See CONTRIBUTORS.txt for the list of RediStack project authors
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
+4
-4
@@ -1,12 +1,12 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// This source file is part of the RedisNIO open source project
|
||||
// This source file is part of the RediStack open source project
|
||||
//
|
||||
// Copyright (c) 2019 RedisNIO project authors
|
||||
// Copyright (c) 2019 RediStack project authors
|
||||
// Licensed under Apache License v2.0
|
||||
//
|
||||
// See LICENSE.txt for license information
|
||||
// See CONTRIBUTORS.txt for the list of RedisNIO project authors
|
||||
// See CONTRIBUTORS.txt for the list of RediStack project authors
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
import Foundation
|
||||
import NIO
|
||||
import RedisNIO
|
||||
import RediStack
|
||||
|
||||
extension RedisConnection {
|
||||
/// Creates a connection intended for tests using `REDIS_URL` and `REDIS_PW` environment variables if available.
|
||||
+6
-6
@@ -1,19 +1,19 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// This source file is part of the RedisNIO open source project
|
||||
// This source file is part of the RediStack open source project
|
||||
//
|
||||
// Copyright (c) 2019 RedisNIO project authors
|
||||
// Copyright (c) 2019 RediStack project authors
|
||||
// Licensed under Apache License v2.0
|
||||
//
|
||||
// See LICENSE.txt for license information
|
||||
// See CONTRIBUTORS.txt for the list of RedisNIO project authors
|
||||
// See CONTRIBUTORS.txt for the list of RediStack project authors
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
import NIO
|
||||
import RedisNIO
|
||||
import RediStack
|
||||
import XCTest
|
||||
|
||||
/// A helper `XCTestCase` subclass that does the standard work of creating a connection to use in test cases.
|
||||
@@ -32,7 +32,7 @@ open class RedisIntegrationTestCase: XCTestCase {
|
||||
}
|
||||
}
|
||||
|
||||
/// Creates a `RedisNIO.RedisConnection` for the next test case, calling `fatalError` if it was not successful.
|
||||
/// Creates a `RediStack.RedisConnection` for the next test case, calling `fatalError` if it was not successful.
|
||||
///
|
||||
/// See `XCTest.XCTestCase.setUp()`
|
||||
open override func setUp() {
|
||||
@@ -65,7 +65,7 @@ open class RedisIntegrationTestCase: XCTestCase {
|
||||
/// Creates a new connection for use in tests.
|
||||
///
|
||||
/// See `RedisConnection.connect(to:port:)`
|
||||
/// - Returns: The new `RedisNIO.RedisConnection`.
|
||||
/// - Returns: The new `RediStack.RedisConnection`.
|
||||
public func makeNewConnection() throws -> RedisConnection {
|
||||
return try RedisConnection.connect(on: eventLoopGroup.next()).wait()
|
||||
}
|
||||
@@ -1,12 +1,12 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// This source file is part of the RedisNIO open source project
|
||||
// This source file is part of the RediStack open source project
|
||||
//
|
||||
// Copyright (c) 2019 RedisNIO project authors
|
||||
// Copyright (c) 2019 RediStack project authors
|
||||
// Licensed under Apache License v2.0
|
||||
//
|
||||
// See LICENSE.txt for license information
|
||||
// See CONTRIBUTORS.txt for the list of RedisNIO project authors
|
||||
// See CONTRIBUTORS.txt for the list of RediStack project authors
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
@@ -14,8 +14,8 @@
|
||||
|
||||
import XCTest
|
||||
|
||||
import RedisNIOTests
|
||||
import RediStackTests
|
||||
|
||||
var tests = [XCTestCaseEntry]()
|
||||
tests += RedisNIOTests.allTests()
|
||||
tests += RediStackTests.allTests()
|
||||
XCTMain(tests)
|
||||
|
||||
+4
-4
@@ -1,19 +1,19 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// This source file is part of the RedisNIO open source project
|
||||
// This source file is part of the RediStack open source project
|
||||
//
|
||||
// Copyright (c) 2019 RedisNIO project authors
|
||||
// Copyright (c) 2019 RediStack project authors
|
||||
// Licensed under Apache License v2.0
|
||||
//
|
||||
// See LICENSE.txt for license information
|
||||
// See CONTRIBUTORS.txt for the list of RedisNIO project authors
|
||||
// See CONTRIBUTORS.txt for the list of RediStack project authors
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
import NIO
|
||||
@testable import RedisNIO
|
||||
@testable import RediStack
|
||||
import XCTest
|
||||
|
||||
final class RedisByteDecoderTests: XCTestCase {
|
||||
+4
-4
@@ -1,19 +1,19 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// This source file is part of the RedisNIO open source project
|
||||
// This source file is part of the RediStack open source project
|
||||
//
|
||||
// Copyright (c) 2019 RedisNIO project authors
|
||||
// Copyright (c) 2019 RediStack project authors
|
||||
// Licensed under Apache License v2.0
|
||||
//
|
||||
// See LICENSE.txt for license information
|
||||
// See CONTRIBUTORS.txt for the list of RedisNIO project authors
|
||||
// See CONTRIBUTORS.txt for the list of RediStack project authors
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
import NIO
|
||||
@testable import RedisNIO
|
||||
@testable import RediStack
|
||||
import XCTest
|
||||
|
||||
final class RedisMessageEncoderTests: XCTestCase {
|
||||
+5
-5
@@ -1,19 +1,19 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// This source file is part of the RedisNIO open source project
|
||||
// This source file is part of the RediStack open source project
|
||||
//
|
||||
// Copyright (c) 2019 RedisNIO project authors
|
||||
// Copyright (c) 2019 RediStack project authors
|
||||
// Licensed under Apache License v2.0
|
||||
//
|
||||
// See LICENSE.txt for license information
|
||||
// See CONTRIBUTORS.txt for the list of RedisNIO project authors
|
||||
// See CONTRIBUTORS.txt for the list of RediStack project authors
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
@testable import RedisNIO
|
||||
import RedisNIOTestUtils
|
||||
@testable import RediStack
|
||||
import RediStackTestUtils
|
||||
import XCTest
|
||||
|
||||
final class BasicCommandsTests: RedisIntegrationTestCase {
|
||||
+5
-5
@@ -1,19 +1,19 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// This source file is part of the RedisNIO open source project
|
||||
// This source file is part of the RediStack open source project
|
||||
//
|
||||
// Copyright (c) 2019 RedisNIO project authors
|
||||
// Copyright (c) 2019 RediStack project authors
|
||||
// Licensed under Apache License v2.0
|
||||
//
|
||||
// See LICENSE.txt for license information
|
||||
// See CONTRIBUTORS.txt for the list of RedisNIO project authors
|
||||
// See CONTRIBUTORS.txt for the list of RediStack project authors
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
@testable import RedisNIO
|
||||
import RedisNIOTestUtils
|
||||
@testable import RediStack
|
||||
import RediStackTestUtils
|
||||
import XCTest
|
||||
|
||||
final class HashCommandsTests: RedisIntegrationTestCase {
|
||||
+5
-5
@@ -1,19 +1,19 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// This source file is part of the RedisNIO open source project
|
||||
// This source file is part of the RediStack open source project
|
||||
//
|
||||
// Copyright (c) 2019 RedisNIO project authors
|
||||
// Copyright (c) 2019 RediStack project authors
|
||||
// Licensed under Apache License v2.0
|
||||
//
|
||||
// See LICENSE.txt for license information
|
||||
// See CONTRIBUTORS.txt for the list of RedisNIO project authors
|
||||
// See CONTRIBUTORS.txt for the list of RediStack project authors
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
@testable import RedisNIO
|
||||
import RedisNIOTestUtils
|
||||
@testable import RediStack
|
||||
import RediStackTestUtils
|
||||
import XCTest
|
||||
|
||||
final class ListCommandsTests: RedisIntegrationTestCase {
|
||||
+5
-5
@@ -1,19 +1,19 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// This source file is part of the RedisNIO open source project
|
||||
// This source file is part of the RediStack open source project
|
||||
//
|
||||
// Copyright (c) 2019 RedisNIO project authors
|
||||
// Copyright (c) 2019 RediStack project authors
|
||||
// Licensed under Apache License v2.0
|
||||
//
|
||||
// See LICENSE.txt for license information
|
||||
// See CONTRIBUTORS.txt for the list of RedisNIO project authors
|
||||
// See CONTRIBUTORS.txt for the list of RediStack project authors
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
@testable import RedisNIO
|
||||
import RedisNIOTestUtils
|
||||
@testable import RediStack
|
||||
import RediStackTestUtils
|
||||
import XCTest
|
||||
|
||||
final class SetCommandsTests: RedisIntegrationTestCase {
|
||||
+5
-5
@@ -1,20 +1,20 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// This source file is part of the RedisNIO open source project
|
||||
// This source file is part of the RediStack open source project
|
||||
//
|
||||
// Copyright (c) 2019 RedisNIO project authors
|
||||
// Copyright (c) 2019 RediStack project authors
|
||||
// Licensed under Apache License v2.0
|
||||
//
|
||||
// See LICENSE.txt for license information
|
||||
// See CONTRIBUTORS.txt for the list of RedisNIO project authors
|
||||
// See CONTRIBUTORS.txt for the list of RediStack project authors
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
import NIO
|
||||
@testable import RedisNIO
|
||||
import RedisNIOTestUtils
|
||||
@testable import RediStack
|
||||
import RediStackTestUtils
|
||||
import XCTest
|
||||
|
||||
final class SortedSetCommandsTests: RedisIntegrationTestCase {
|
||||
+5
-5
@@ -1,19 +1,19 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// This source file is part of the RedisNIO open source project
|
||||
// This source file is part of the RediStack open source project
|
||||
//
|
||||
// Copyright (c) 2019 RedisNIO project authors
|
||||
// Copyright (c) 2019 RediStack project authors
|
||||
// Licensed under Apache License v2.0
|
||||
//
|
||||
// See LICENSE.txt for license information
|
||||
// See CONTRIBUTORS.txt for the list of RedisNIO project authors
|
||||
// See CONTRIBUTORS.txt for the list of RediStack project authors
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
@testable import RedisNIO
|
||||
import RedisNIOTestUtils
|
||||
@testable import RediStack
|
||||
import RediStackTestUtils
|
||||
import XCTest
|
||||
|
||||
final class StringCommandsTests: RedisIntegrationTestCase {
|
||||
+4
-4
@@ -1,12 +1,12 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// This source file is part of the RedisNIO open source project
|
||||
// This source file is part of the RediStack open source project
|
||||
//
|
||||
// Copyright (c) 2019 RedisNIO project authors
|
||||
// Copyright (c) 2019 RediStack project authors
|
||||
// Licensed under Apache License v2.0
|
||||
//
|
||||
// See LICENSE.txt for license information
|
||||
// See CONTRIBUTORS.txt for the list of RedisNIO project authors
|
||||
// See CONTRIBUTORS.txt for the list of RediStack project authors
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
import struct Foundation.Data
|
||||
import NIO
|
||||
@testable import RedisNIO
|
||||
@testable import RediStack
|
||||
import XCTest
|
||||
|
||||
final class RESPTranslatorTests: XCTestCase {
|
||||
+5
-5
@@ -1,19 +1,19 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// This source file is part of the RedisNIO open source project
|
||||
// This source file is part of the RediStack open source project
|
||||
//
|
||||
// Copyright (c) 2019 RedisNIO project authors
|
||||
// Copyright (c) 2019 RediStack project authors
|
||||
// Licensed under Apache License v2.0
|
||||
//
|
||||
// See LICENSE.txt for license information
|
||||
// See CONTRIBUTORS.txt for the list of RedisNIO project authors
|
||||
// See CONTRIBUTORS.txt for the list of RediStack project authors
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
@testable import RedisNIO
|
||||
import RedisNIOTestUtils
|
||||
@testable import RediStack
|
||||
import RediStackTestUtils
|
||||
import XCTest
|
||||
|
||||
final class RedisConnectionTests: RedisIntegrationTestCase {
|
||||
+3
-3
@@ -1,12 +1,12 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// This source file is part of the RedisNIO open source project
|
||||
// This source file is part of the RediStack open source project
|
||||
//
|
||||
// Copyright (c) 2019 RedisNIO project authors
|
||||
// Copyright (c) 2019 RediStack project authors
|
||||
// Licensed under Apache License v2.0
|
||||
//
|
||||
// See LICENSE.txt for license information
|
||||
// See CONTRIBUTORS.txt for the list of RedisNIO project authors
|
||||
// See CONTRIBUTORS.txt for the list of RediStack project authors
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
@@ -1,13 +1,13 @@
|
||||
#!/bin/bash
|
||||
##===----------------------------------------------------------------------===##
|
||||
##
|
||||
## This source file is part of the RedisNIO open source project
|
||||
## This source file is part of the RediStack open source project
|
||||
##
|
||||
## Copyright (c) 2019 RedisNIO project authors
|
||||
## Copyright (c) 2019 RediStack project authors
|
||||
## Licensed under Apache License v2.0
|
||||
##
|
||||
## See LICENSE.txt for license information
|
||||
## See CONTRIBUTORS.txt for the list of RedisNIO project authors
|
||||
## See CONTRIBUTORS.txt for the list of RediStack project authors
|
||||
##
|
||||
## SPDX-License-Identifier: Apache-2.0
|
||||
##
|
||||
@@ -32,7 +32,7 @@ contributors=$( cd "$here"/.. && git shortlog -es | cut -f2 | sed 's/^/- /' )
|
||||
|
||||
cat > "$here/../CONTRIBUTORS.txt" <<- EOF
|
||||
For the purpose of tracking copyright, this is the list of individuals and
|
||||
organizations who have contributed source code to RedisNIO.
|
||||
organizations who have contributed source code to RediStack.
|
||||
|
||||
For employees of an organization/company where the copyright of work done
|
||||
by employees of that company is held by the company itself, only the company
|
||||
|
||||
Reference in New Issue
Block a user