Skip to content

Commit ae1b20b

Browse files
committed
Merge branch 'release-rs-gilboa' into DOC-5680
2 parents b88af88 + 66b4a12 commit ae1b20b

File tree

85 files changed

+1511
-385
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+1511
-385
lines changed

assets/css/index.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -598,6 +598,11 @@ html {
598598
scrollbar-gutter: stable;
599599
}
600600

601+
/* Auto-clickable for standalone images */
602+
img:not(a img):not(.image-card-img):not([src*="#no-click"]) {
603+
cursor: pointer;
604+
}
605+
601606
/* Chroma syntax highlighting */
602607

603608
/* Background */

build/components/example.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@
2626
'go': '//',
2727
'c#': '//',
2828
'redisvl': '#',
29-
'php': '//'
29+
'php': '//',
30+
'rust': '//',
31+
'rust-sync': '//',
32+
'rust-async': '//'
3033
}
3134

3235

build/local_examples.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525
'.go': 'go',
2626
'.cs': 'c#',
2727
'.java': 'java',
28-
'.php': 'php'
28+
'.php': 'php',
29+
'.rs': 'rust'
2930
}
3031

3132
# Language to client name mapping (from config.toml clientsExamples)
@@ -36,7 +37,8 @@
3637
'c#': 'C#',
3738
'java': 'Java-Sync', # Default to sync, could be overridden
3839
'php': 'PHP',
39-
'redisvl': 'RedisVL'
40+
'redisvl': 'RedisVL',
41+
'rust': 'Rust-Sync'
4042
}
4143

4244

@@ -65,6 +67,11 @@ def get_client_name_from_language_and_path(language: str, path: str) -> str:
6567
return 'Java-Async'
6668
if 'lettuce-reactive' in path:
6769
return 'Java-Reactive'
70+
if language == 'rust':
71+
if 'rust-async' in path:
72+
return 'Rust-Async'
73+
if 'rust-sync' in path:
74+
return 'Rust-Sync'
6875
# Default behavior for all languages (and Java fallback)
6976
return get_client_name_from_language(language)
7077

config.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ tagManagerId = "GTM-TKZ6J9R"
4545
gitHubRepo = "https://github.com/redis/docs"
4646

4747
# Display and sort order for client examples
48-
clientsExamples = ["Python", "Node.js", "Java-Sync", "Java-Async", "Java-Reactive", "Go", "C#", "RedisVL", "PHP"]
48+
clientsExamples = ["Python", "Node.js", "Java-Sync", "Java-Async", "Java-Reactive", "Go", "C#", "RedisVL", "PHP", "Rust-Sync", "Rust-Async"]
4949
searchService = "/convai/api/search-service"
5050
ratingsService = "/docusight/api/rate"
5151

@@ -67,6 +67,8 @@ rdi_current_version = "1.14.1"
6767
"C#"={quickstartSlug="dotnet"}
6868
"RedisVL"={quickstartSlug="redis-vl"}
6969
"PHP"={quickstartSlug="php"}
70+
"Rust-sync"={quickstartSlug="rust"}
71+
"Rust-async"={quickstartSlug="rust"}
7072

7173
# Markup
7274
[markup]

content/develop/clients/_index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ weight: 30
1919

2020
Use the Redis client libraries to connect to Redis servers from
2121
your own code. We document the following client libraries
22-
for seven main languages:
22+
for eight main languages:
2323

2424
| Language | Client name | Docs | Supported |
2525
| :-- | :-- | :-- | :-- |
@@ -32,6 +32,7 @@ for seven main languages:
3232
| [Go](https://go.dev/) | [`go-redis`](https://github.com/redis/go-redis) | [`go-redis` guide]({{< relref "/develop/clients/go" >}}) | Yes |
3333
| [PHP](https://www.php.net/)| [`Predis`](https://github.com/predis/predis) | [`Predis` guide]({{< relref "/develop/clients/php" >}}) | No |
3434
| [C](https://en.wikipedia.org/wiki/C_(programming_language)) | [`hiredis`](https://github.com/redis/hiredis) | [`hiredis` guide]({{< relref "/develop/clients/hiredis" >}}) | Yes |
35+
| [Rust](https://www.rust-lang.org/) | [`redis-rs`](https://github.com/redis-rs/redis-rs) | [`redis-rs` guide]({{< relref "/develop/clients/rust" >}}) | No |
3536

3637
We also provide several higher-level
3738
[object mapping (OM)]({{< relref "/develop/clients/om-clients" >}})
@@ -51,7 +52,6 @@ Redis does not document directly:
5152
| [Dart](https://dart.dev/) | redis_dart_link | https://github.com/toolsetlink/redis_dart_link | https://github.com/toolsetlink/redis_dart_link |
5253
| [PHP](https://www.php.net/) | PhpRedis extension | https://github.com/phpredis/phpredis | https://github.com/phpredis/phpredis/blob/develop/README.md |
5354
| [Ruby](https://www.ruby-lang.org/en/) | redis-rb | https://github.com/redis/redis-rb | https://rubydoc.info/gems/redis |
54-
| [Rust](https://www.rust-lang.org/) | redis-rs | https://github.com/redis-rs/redis-rs | https://docs.rs/redis/latest/redis/ |
5555

5656

5757
## Requirements

content/develop/clients/hiredis/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ categories:
1212
description: Connect your C application to a Redis database.
1313
linkTitle: hiredis (C)
1414
title: hiredis guide (C)
15-
weight: 9
15+
weight: 10
1616
---
1717

1818
[`hiredis`](https://github.com/redis/hiredis) is the
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
---
2+
categories:
3+
- docs
4+
- develop
5+
- stack
6+
- oss
7+
- rs
8+
- rc
9+
- oss
10+
- kubernetes
11+
- clients
12+
description: Connect your Rust application to a Redis database
13+
linkTitle: redis-rs (Rust)
14+
title: redis-rs guide (Rust)
15+
weight: 9
16+
---
17+
18+
[`redis-rs`](https://github.com/redis-rs/redis-rs) is the [Rust](https://www.rust-lang.org/) client for Redis.
19+
The sections below explain how to install `redis-rs` and connect your application to a Redis database.
20+
21+
{{< note >}}Although we provide basic documentation for `redis-rs`, it is a third-party
22+
client library and is not developed or supported directly by Redis.
23+
{{< /note >}}
24+
25+
`redis-rs` requires a running Redis server. See [here]({{< relref "/operate/oss_and_stack/install/" >}}) for Redis Open Source installation instructions.
26+
27+
## Install
28+
29+
To use the synchronous API, add the `redis` crate as a dependency in your
30+
`Cargo.toml` file:
31+
32+
```toml
33+
[dependencies]
34+
redis = "0.32.5"
35+
```
36+
37+
If you want to use the asynchronous API, you should also enable either
38+
[`tokio`](https://tokio.rs/) or [`smol`](https://crates.io/crates/smol)
39+
as your async platform:
40+
41+
```toml
42+
[dependencies]
43+
# if you use tokio
44+
tokio = { version = "1.32.0", features = ["full"] }
45+
redis = { version = "0.32.5", features = ["tokio-comp"] }
46+
47+
# if you use smol
48+
smol = "2.0.2"
49+
redis = { version = "0.32.5", features = ["smol-comp"] }
50+
```
51+
52+
## Connect
53+
54+
Start by importing the `Commands` or `AsyncCommands` trait from the `redis` crate:
55+
56+
{{< clients-example set="landing" step="import" lang_filter="Rust-Sync,Rust-Async" >}}
57+
{{< /clients-example >}}
58+
59+
The following example shows the simplest way to connect to a Redis server:
60+
61+
{{< clients-example set="landing" step="connect" lang_filter="Rust-Sync,Rust-Async" >}}
62+
{{< /clients-example >}}
63+
64+
After connecting, you can test the connection by storing and retrieving
65+
a simple [string]({{< relref "/develop/data-types/strings" >}}):
66+
67+
{{< clients-example set="landing" step="set_get_string" lang_filter="Rust-Sync,Rust-Async" >}}
68+
{{< /clients-example >}}
69+
70+
You can also easily store and retrieve a [hash]({{< relref "/develop/data-types/hashes" >}}):
71+
72+
{{< clients-example set="landing" step="set_get_hash" lang_filter="Rust-Sync,Rust-Async" >}}
73+
{{< /clients-example >}}
74+
75+
## More information
76+
77+
See the [`redis-rs`](https://docs.rs/redis/latest/redis/) documentation
78+
and the [GitHub repository](https://github.com/redis-rs/redis-rs) for more
79+
information and examples.

content/embeds/rs-prometheus-metrics-v2.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
| <span class="break-all">node_available_memory_no_overbooking_bytes</span> | gauge | Available RAM in the node (bytes) without taking into account overbooking |
5454
| node_bigstore_free_bytes | gauge | Sum of free space of back-end flash (used by flash database's [BigRedis]) on all cluster nodes (bytes); returned only when BigRedis is enabled |
5555
| <span class="break-all">node_cert_expires_in_seconds</span> | gauge | Certificate expiration (in seconds) per given node; read more about [certificates in Redis Enterprise]({{< relref "/operate/rs/security/certificates" >}}) and [monitoring certificates]({{< relref "/operate/rs/security/certificates/monitor-certificates" >}}) |
56+
| <span class="break-all">customer_managed_ine_certificates</span> | gauge | Indicates whether customer-provided internode encryption certificates are in use<br />0=No<br />1=Yes |
5657
| <span class="break-all">node_ephemeral_storage_avail_bytes</span> | gauge | Disk space available to RLEC processes on configured ephemeral disk (bytes) |
5758
| <span class="break-all">node_ephemeral_storage_free_bytes</span> | gauge | Free disk space on configured ephemeral disk (bytes) |
5859
| node_memory_MemFree_bytes | gauge | Free memory in the node (bytes) |

content/integrate/amazon-bedrock/set-up-redis.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,11 @@ To set up a Redis Cloud instance for Bedrock, you need to:
7979

8080
1. Select **Amazon Web Services** as the cloud vendor and select a region.
8181

82-
1. In the **Optimal database settings** section:
82+
1. In the **Database Sizing** section:
8383

8484
{{<image filename="images/rc/pro-easy-create-size-throughput.png" alt="The Dataset size, throughput, and High availability settings.">}}
8585

86-
- Turn on [**High-availability**]({{< relref "/operate/rc/databases/configuration/high-availability" >}}).
86+
- Select [**High availability**]({{< relref "/operate/rc/databases/configuration/high-availability" >}}) if it is not already selected.
8787
- Set the Dataset size of your database based on the amount of data that Bedrock will pull from your Simple Storage Service (S3) [bucket](https://docs.aws.amazon.com/AmazonS3/latest/userguide/creating-buckets-s3.html). See [Find out the size of your S3 buckets](https://aws.amazon.com/blogs/storage/find-out-the-size-of-your-amazon-s3-buckets/) to find out how much knowledge base data is stored in your S3 bucket and pick the closest size, rounded up, from the table below.
8888

8989
| Total Size of Documents in S3 | Database size without replication | Database size with replication |

content/integrate/prometheus-with-redis-cloud/_index.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ Redis Cloud exposes its metrics through a Prometheus endpoint. You can configure
2525

2626
The Redis Cloud Prometheus endpoint is exposed on Redis Cloud's internal network. To access this network, enable [VPC peering]({{< relref "/operate/rc/security/vpc-peering" >}}) or [Private Service Connect]({{< relref "/operate/rc/security/private-service-connect" >}}). Both options are only available with Redis Cloud Pro. You cannot use Prometheus and Grafana with Redis Cloud Essentials.
2727

28+
{{< note >}}
29+
30+
The Prometheus endpoint's metrics cover all databases within a subscription. Any database added to or removed from the subscription is reflected automatically.
31+
32+
{{< /note >}}
33+
2834
For more information on how Prometheus communicates with Redis Enterprise clusters, see [Prometheus integration with Redis Enterprise Software]({{< relref "/integrate/prometheus-with-redis-enterprise/" >}}).
2935

3036
## Quick start

0 commit comments

Comments
 (0)