<kbd id="afajh"><form id="afajh"></form></kbd>
<strong id="afajh"><dl id="afajh"></dl></strong>
    <del id="afajh"><form id="afajh"></form></del>
        1. <th id="afajh"><progress id="afajh"></progress></th>
          <b id="afajh"><abbr id="afajh"></abbr></b>
          <th id="afajh"><progress id="afajh"></progress></th>

          rueidisGo 語言的 Redis 開發(fā)包

          聯(lián)合創(chuàng)作 · 2023-09-29 05:39

          rueidis 是一個高性能的 Go 語言的 Redis RESP3 客戶端開發(fā)包,支持客戶端緩存和自動流水線。

          主要特征

          • 用于非阻塞 redis 命令的自動管道
          • 用于阻止 redis 命令的連接池
          • 選擇加入客戶端緩存
          • redis cluster, pub/sub, streams, TLS, RedisJSON, RedisBloom, RediSearch, RedisGraph, RedisTimeseries
          • IDE 友好的 redis 命令生成器
          • 具有客戶端緩存和樂觀鎖定的哈希/RedisJSON 對象映射
          • 打開遙測跟蹤和指標

          示例代碼:

          package main
          
          import (
          	"context"
          	"github.com/rueian/rueidis"
          )
          
          func main() {
          	c, _ := rueidis.NewClient(rueidis.ClientOption{
          		InitAddress: []string{"127.0.0.1:6379"},
          	})
          	defer c.Close()
          
          	ctx := context.Background()
          
          	_ := c.Do(ctx, c.B().Set().Key("my_data").Value("my_value").Nx().Build()).Error()
          	val, _ := c.Do(ctx, c.B().Get().Key("my_data").Build()).ToString()
          	// val == "my_value"
          }

          性能測試:

          Rueidis 比 go-redis 8.11.4 擁有更高的吞吐量。

          Single Client

           

          Cluster Client

           

          性能測試源碼: https://github.com/rueian/rueidis-benchmark

          瀏覽 29
          點贊
          評論
          收藏
          分享

          手機掃一掃分享

          編輯 分享
          舉報
          評論
          圖片
          表情
          推薦
          點贊
          評論
          收藏
          分享

          手機掃一掃分享

          編輯 分享
          舉報
          <kbd id="afajh"><form id="afajh"></form></kbd>
          <strong id="afajh"><dl id="afajh"></dl></strong>
            <del id="afajh"><form id="afajh"></form></del>
                1. <th id="afajh"><progress id="afajh"></progress></th>
                  <b id="afajh"><abbr id="afajh"></abbr></b>
                  <th id="afajh"><progress id="afajh"></progress></th>
                  一级黄色电影在线看 | 中国学生妹做爱视频 | 大香蕉精品在线 | 久久久国产精品 | 亚洲日韩国产精品一区无码AV |