You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Change Redis.makeDefaultClientBootstrap to ClientBootstrap.makeRedisTCPClient
Motivation:
During proposal review, feedback was provided that the discoverability of the factory method for building a standard RESP `ChannelPipeline` was poor outside of documentation.
Modifications:
- Move `Redis.makeDefaultClientBootstrap` to `ClientBootstrap.makeRedisTCPClient`.
- Move the `channelInitializer` implementation into a new `Channel.addBaseRedisHandlers()` instance method.
Result:
Users should have an easier time discovering how to easily create baseline RESP `ChannelPipelines`.
This contributes to #47.
Copy file name to clipboardExpand all lines: Sources/RedisNIO/Extensions/SwiftNIO.swift
+34Lines changed: 34 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -36,3 +36,37 @@ extension EventLoopFuture where Value == RESPValue {
36
36
}
37
37
}
38
38
}
39
+
40
+
extensionChannel{
41
+
/// Adds the baseline `ChannelHandlers` needed to support sending and receiving messages in Redis Serialization Protocol (RESP) format to the pipeline.
42
+
///
43
+
/// For implementation details, see `RedisMessageEncoder`, `RedisByteDecoder`, and `RedisCommandHandler`.
44
+
/// - Returns: An `EventLoopFuture` that resolves after all handlers have been added to the pipeline.
0 commit comments