File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -4,12 +4,12 @@ import NIORedis
4
4
5
5
/// A factory that handles all necessary details for creating `RedisConnection` instances.
6
6
public final class Redis {
7
- private let driver : NIORedis
7
+ private let driver : RedisDriver
8
8
9
9
deinit { try ? driver. terminate ( ) }
10
10
11
11
public init ( threadCount: Int = 1 ) {
12
- self . driver = NIORedis ( executionModel: . spawnThreads( threadCount) )
12
+ self . driver = RedisDriver ( executionModel: . spawnThreads( threadCount) )
13
13
}
14
14
15
15
public func makeConnection(
Original file line number Diff line number Diff line change @@ -2,20 +2,20 @@ import Foundation
2
2
import NIORedis
3
3
4
4
public final class RedisConnection {
5
- let _driverConnection : NIORedisConnection
5
+ let _driverConnection : NIORedis . RedisConnection
6
6
7
7
private let queue : DispatchQueue
8
8
9
9
deinit { _driverConnection. close ( ) }
10
10
11
- init ( driver: NIORedisConnection , callbackQueue: DispatchQueue ) {
11
+ init ( driver: NIORedis . RedisConnection , callbackQueue: DispatchQueue ) {
12
12
self . _driverConnection = driver
13
13
self . queue = callbackQueue
14
14
}
15
15
16
16
/// Creates a `RedisPipeline` for executing a batch of commands.
17
17
public func makePipeline( callbackQueue: DispatchQueue ? = nil ) -> RedisPipeline {
18
- return . init( using : self , callbackQueue: callbackQueue ?? queue)
18
+ return . init( connection : self , callbackQueue: callbackQueue ?? queue)
19
19
}
20
20
21
21
public func get(
Original file line number Diff line number Diff line change @@ -14,15 +14,15 @@ import NIORedis
14
14
/// - Important: The larger the pipeline queue, the more memory both the Redis driver and Redis server will use.
15
15
/// See https://redis.io/topics/pipelining#redis-pipelining
16
16
public final class RedisPipeline {
17
- private let _driverPipeline : NIORedisPipeline
17
+ private let _driverPipeline : NIORedis . RedisPipeline
18
18
private let queue : DispatchQueue
19
19
20
20
/// Creates a new pipeline queue using the provided `RedisConnection`, executing callbacks on the provided `DispatchQueue`.
21
21
/// - Parameters:
22
22
/// - using: The connection to execute the commands on.
23
23
/// - callbackQueue: The queue to execute all callbacks on.
24
- public init ( using connection: RedisConnection , callbackQueue: DispatchQueue ) {
25
- self . _driverPipeline = NIORedisPipeline ( using : connection. _driverConnection)
24
+ public init ( connection: RedisConnection , callbackQueue: DispatchQueue ) {
25
+ self . _driverPipeline = NIORedis . RedisPipeline ( channel : connection. _driverConnection. channel )
26
26
self . queue = callbackQueue
27
27
}
28
28
You can’t perform that action at this time.
0 commit comments