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
### Description
- A couple of blog posts had issues with code highlighting which was
spamming the Zola log making it hard to find issues.
- I also assigned code block names to undefined ones to stop the linter
yelling at me
### Issues Resolved
n/a
### Check List
- [x] Commits are signed per the DCO using `--signoff`
By submitting this pull request, I confirm that my contribution is made
under the terms of the BSD-3-Clause License.
Signed-off-by: Kyle J. Davis <[email protected]>
The Valkey GLIDE Go client is built on top of the Valkey GLIDE core. The core framework is written in Rust (lib.rs), which exposes public functions. These functions are converted to a C header file using Cbindgen. The Go client then uses CGO to call these C functions, providing Go developers with an idiomatic interface while leveraging Rust's performance advantages. This architecture ensures consistent behavior across all Valkey GLIDE language implementations (Java, Python, Node.js, and Go) while maintaining performance and reliability.
@@ -97,21 +97,21 @@ Sample document for key `user:6379`
97
97
98
98
Store and retrieve JSON document with nested elements and arrays using `valkey-cli` with the [`JSON.SET`](https://valkey.io/commands/json.set/) command.
Complex query with filters to retrieve orders where total is over 100 from within the array in the document for the given user, we'll use [`JSON.GET`](https://valkey.io/commands/json.get/) command.
106
106
107
-
```
107
+
```txt
108
108
> JSON.GET user:6379 '$.orders[?(@.total > 100)]'
109
109
"[{\"id\":\"ord2\",\"total\":150.50}]"
110
110
```
111
111
112
112
Perform *Array* operations by inserting an item to the orders list using [`JSON.ARRAPPEND`](https://valkey.io/commands/json.arrappend/) command.
Check filter capacity and stats using [`BF.INFO`](https://valkey.io/commands/bf.info/) for fixed filter
158
158
159
-
```
159
+
```txt
160
160
> BF.INFO non_scaling_filter CAPACITY
161
161
(integer) 1000000
162
162
```
163
163
164
164
Check filter capacity and stats for scaling filter
165
165
166
-
```
166
+
```txt
167
167
> BF.INFO scaling_filter MAXSCALEDCAPACITY
168
168
(integer) 34952500
169
169
```
170
170
171
171
Bulk operations, use [`BF.MADD`](https://valkey.io/commands/bf.madd/) to track multiple elements at once:
172
172
173
-
```
173
+
```txt
174
174
> BF.MADD non_scaling_filter item1 item2 item3
175
175
1) (integer) 1
176
176
2) (integer) 1
@@ -179,7 +179,7 @@ Bulk operations, use [`BF.MADD`](https://valkey.io/commands/bf.madd/) to track m
179
179
180
180
Check for multiple items in a single roundtrip using [`BF.MEXISTS`](https://valkey.io/commands/bf.mexists/), if we try to get an item that does not exist (item4), we get a Zero as response.
181
181
182
-
```
182
+
```txt
183
183
> BF.MEXISTS non_scaling_filter item1 item2 item4
184
184
1) (integer) 1
185
185
2) (integer) 1
@@ -220,7 +220,7 @@ Check for multiple items in a single roundtrip using [`BF.MEXISTS`](https://valk
220
220
221
221
Create an index with HNSW configuration with [`FT.CREATE`](https://valkey.io/commands/ft.create/):
222
222
223
-
```
223
+
```txt
224
224
> FT.CREATE productIndex \
225
225
ON JSON PREFIX 1 product: \
226
226
SCHEMA $.vector AS vector \
@@ -237,7 +237,7 @@ OK
237
237
238
238
Perform Hybrid query combining vector similarity with filters using [`FT.SEARCH`](https://valkey.io/commands/ft.search/)` index query`:
@@ -509,7 +509,7 @@ This query combines vector similarity search with category filtering, ensuring r
509
509
Nobody likes seeing the same ad repeatedly. We use Valkey Bloom to efficiently track which user each ad has been shown. The beauty of Bloom filters is their space efficiency, we can track millions of impressions using minimal memory.
510
510
511
511
Track ad impressions by the Ad Id
512
-
```console
512
+
```txt
513
513
> BF.RESERVE ad:a789012 0.01 10000000
514
514
OK
515
515
@@ -518,13 +518,13 @@ OK
518
518
```
519
519
520
520
Quick check before showing an ad
521
-
```console
521
+
```txt
522
522
> BF.EXISTS ad:a789012 "user:u123456"
523
523
(integer) 1
524
524
```
525
525
526
526
Try a different user for the same Ad Id.
527
-
```console
527
+
```txt
528
528
> BF.EXISTS ad:a789012 "user:u234567"
529
529
(integer) 0
530
530
```
@@ -540,7 +540,7 @@ Our Ad Platform needs to support multiple teams with different access levels - f
540
540
First, let's set up our LDAP integration to map organizational roles:
541
541
542
542
Configure LDAP connection with out imaginary Valkey LDAP
543
-
```console
543
+
```txt
544
544
> CONFIG SET ldap.servers "ldaps://ldap.valkey.io:636"
545
545
OK
546
546
@@ -555,7 +555,7 @@ OK
555
555
```
556
556
557
557
Enable TLS for secure communication
558
-
```console
558
+
```txt
559
559
> CONFIG SET ldap.use_starttls yes
560
560
OK
561
561
@@ -568,7 +568,7 @@ OK
568
568
We'll create different access levels using Valkey ACLs that map to LDAP groups:
569
569
570
570
Account Managers - Can view and modify client campaigns
571
-
```console
571
+
```txt
572
572
> ACL SETUSER account_manager on resetpass +@read +@write -@admin >client_secret
573
573
~campaign:*
574
574
~client:*
@@ -577,7 +577,7 @@ OK
577
577
```
578
578
579
579
Content Creators - Can manage ad content and view basic analytics
580
-
```console
580
+
```txt
581
581
> ACL SETUSER content_creator on resetpass +@read +@write -@admin >content_secret
582
582
~ad:*
583
583
~content:*
@@ -586,15 +586,15 @@ OK
586
586
```
587
587
588
588
Data Analysts - Read-only access to all analytics data
589
-
```console
589
+
```txt
590
590
> ACL SETUSER data_analyst on resetpass +@read -@write -@admin >analyst_secret
591
591
~analytics:*
592
592
&campaign:*
593
593
OK
594
594
```
595
595
596
596
System Administrators - Full access
597
-
```console
597
+
```txt
598
598
> ACL SETUSER admin on resetpass +@all >admin_secret
0 commit comments