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
Copy file name to clipboardExpand all lines: docs/sources/next/javascript-api/k6-experimental/redis/client/_index.md
+7-5Lines changed: 7 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,18 +7,20 @@ weight: 10
7
7
8
8
# Client
9
9
10
-
`Client` is a [Redis](https://redis.io) client to interact with a Redis server, sentinel or cluster. It exposes a promise-based API, which users can interact with in an asynchronous manner.
10
+
`Client` is a [Redis](https://redis.io) client to interact with a Redis server, sentinel, or cluster. It exposes a promise-based API, which users can interact with in an asynchronous manner.
11
11
12
12
Though the API intends to be thorough and extensive, it does not expose the whole Redis API. Instead, the intent is to expose Redis for use cases most appropriate to k6.
13
13
14
14
## Usage
15
15
16
16
### Single-node server
17
17
18
-
As shown in the above example, the simplest way to create a new `Client` instance that connects to a single Redis server is by passing a URL string.
18
+
You can create a new `Client` instance that connects to a single Redis server by passing a URL string.
Here's an example of a URL string that connects to a Redis server running on localhost, on the default port (6379), and using the default database (0):
24
26
@@ -53,7 +55,7 @@ const client = new redis.Client({
53
55
54
56
### TLS
55
57
56
-
A TLS connection can be established in a couple of ways.
58
+
You can configure a TLS connection in a couple of ways.
57
59
58
60
If the server has a certificate signed by a public Certificate Authority, you can use the `rediss` URL scheme:
59
61
@@ -87,7 +89,7 @@ const client = new redis.Client({
87
89
88
90
{{< /code >}}
89
91
90
-
Note that for self-signed certificates, k6's [**insecureSkipTLSVerify**](https://grafana.com/docs/k6/<K6_VERSION>/using-k6/k6-options/reference/#insecure-skip-tls-verify) option must be enabled (set to `true`).
92
+
Note that for self-signed certificates, k6's [insecureSkipTLSVerify](https://grafana.com/docs/k6/<K6_VERSION>/using-k6/k6-options/reference/#insecure-skip-tls-verify) option must be enabled (set to `true`).
0 commit comments