@@ -26,8 +26,9 @@ or it can be used as a relay to implement a chat server using its builtin
2626[ PubSub] ( https://redis.io/topics/pubsub )
2727features.
2828
29- This Swift package includes the RESP protocol implementation and a simple
30- Redis client.
29+ This Swift package includes the RESP protocol implementation.
30+ A simple Redis client can be found on
31+ [ swift-nio-redis-client] ( https://github.com/NozeIO/swift-nio-redis-client ) .
3132We also provide an actual [ Redis Server] ( https://github.com/NozeIO/redi-s )
3233written in Swift, using SwiftNIO and SwiftNIO Redis.
3334
@@ -53,14 +54,12 @@ import PackageDescription
5354let package = Package (
5455 name : " RedisTests" ,
5556 dependencies : [
56- .package (url : " https://github.com/NozeIO /swift-nio-redis.git" ,
57+ .package (url : " https://github.com/SwiftNIOExtras /swift-nio-redis.git" ,
5758 from : " 0.8.0" )
5859 ],
5960 targets : [
6061 .target (name : " MyProtocolTool" ,
61- dependencies : [ " NIORedis" ]),
62- .target (name : " MyClientTool" ,
63- dependencies : [ " Redis" ])
62+ dependencies : [ " NIORedis" ])
6463 ]
6564)
6665```
@@ -92,62 +91,13 @@ bootstrap.channelInitializer { channel in
9291```
9392
9493
95- ## Using the Redis client module
96-
97- The
98- [ Redis] ( Sources/Redis/README.md )
99- client module is modeled after the Node.js
100- [ node_redis] ( https://github.com/NodeRedis/node_redis )
101- module,
102- but it also supports NIO like Promise/Future based methods in addition
103- to the Node.js ` (err,result) ` style callbacks. Choose your poison.
104-
105- ### Simple KVS use example:
106-
107- ``` swift
108- import Redis
109-
110- let client = Redis.createClient ()
111-
112- client.set (" counter" , 0 , expire : 2 )
113- client.incr (" counter" , by : 10 )
114- client.get (" counter" ) { err, value in
115- print (" Reply:" , value)
116- }
117- client.keys (" *" ) { err, reply in
118- guard let keys = reply else { return print (" got no keys!" ) }
119- print (" all keys in store:" , keys.joined (separator : " ," ))
120- }
121- ```
122-
123- Using NIO Promises:
124-
125- ``` swift
126- client
127- .set (" counter" , 0 , expire : 2 )
128- .then {
129- client.incr (" counter" , by : 10 )
130- }
131- .then {
132- client.get (" counter" )
133- }
134- .map {
135- print (" counter is:" , $0 )
136- }
137- ```
138-
139-
14094## Status
14195
14296The
14397[ protocol implementation] ( Sources/NIORedis/ )
14498is considered complete. There are a few open ends
14599in the ` telnet ` variant, yet the regular binary protocol is considered done.
146100
147- The
148- [ Redis client module] ( Sources/Redis/ )
149- has a few more open ends, but seems to work fine.
150-
151101
152102### Who
153103
0 commit comments