<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                ~~~ package redis import ( "github.com/go-redis/redis" "project/library/dao/config" ) /* //命令執行失敗重試次數(默認不重試) MaxRetries: 3, // 空閑連接超時時間,超過超時時間的空閑連接會被關閉。 // 如果設置成0,空閑連接將不會被關閉 // 應該設置一個比redis服務端超時時間更短的時間 IdleTimeout: time.Second * 30, */ type RedisSingleMgr struct { Conn *redis.Client } func InitRedisSingle(cfg *config.RedisCfg) *RedisSingleMgr { return &RedisSingleMgr{ Conn: redis.NewClient(&redis.Options{ Addr: cfg.Addr, Password: cfg.Password, //DB: 0, //PoolSize: viper.GetInt("redis.pool.max"), //MinIdleConns: viper.GetInt("redis.pool.min"), }), } } type RedisDoubleMgr struct { Conn *redis.ClusterClient } func InitRedisDouble(cfg *config.RedisCfg) *RedisDoubleMgr { return &RedisDoubleMgr{ Conn: redis.NewClusterClient(&redis.ClusterOptions{ Addrs: cfg.Addrs, }), } } /* 隊列(左出右進) */ func (mgr *RedisSingleMgr) Push(key string, values ...interface{}) *redis.IntCmd { return mgr.Conn.RPush(key, values...) } func (mgr *RedisSingleMgr) Pop(key string) *redis.StringCmd { return mgr.Conn.LPop(key) } func (mgr *RedisSingleMgr) Range(key string, start, stop int64) *redis.StringSliceCmd { return mgr.Conn.LRange(key, start, stop) } ~~~
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看