File tree Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -47,11 +47,31 @@ fn fetch_an_integer() -> redis::RedisResult<isize> {
47
47
}
48
48
```
49
49
50
+ ## TLS Support
51
+
52
+ To enable TLS support, you need to use the relevant feature entry in your Cargo.toml.
53
+
54
+ ```
55
+ redis = { version = "0.17.0", default-features = false, features = ["tls"] }
56
+
57
+ # if you use tokio
58
+ redis = { version = "0.17.0", default-features = false, features = ["tls", "tokio-tls-comp"] }
59
+
60
+ # if you use async-std
61
+ redis = { version = "0.17.0", default-features = false, features = ["tls", "async-std-tls-comp"] }
62
+ ```
63
+
64
+ then you should be able to connect to a redis instance using the ` redis:// ` URL scheme:
65
+
66
+ ``` rust
67
+ let client = redis :: Client :: open (" rediss://127.0.0.1/" )? ;
68
+ ```
69
+
50
70
## Cluster Support
51
71
52
72
Cluster mode can be used by specifying "cluster" as a features entry in your Cargo.toml.
53
73
54
- ` redis = { version = "0.16 .0", features = [ "cluster"] } `
74
+ ` redis = { version = "0.17 .0", features = [ "cluster"] } `
55
75
56
76
Then you can simply use the ` ClusterClient ` which accepts a list of available nodes.
57
77
You can’t perform that action at this time.
0 commit comments