gitea/vendor/github.com/go-redis/redis/v8/CHANGELOG.md
6543 792b4dba2c
[Vendor] Update directly used dependencys (#15593)
* update github.com/blevesearch/bleve v2.0.2 -> v2.0.3

* github.com/denisenkom/go-mssqldb v0.9.0 -> v0.10.0

* github.com/editorconfig/editorconfig-core-go v2.4.1 -> v2.4.2

* github.com/go-chi/cors v1.1.1 -> v1.2.0

* github.com/go-git/go-billy v5.0.0 -> v5.1.0

* github.com/go-git/go-git v5.2.0 -> v5.3.0

* github.com/go-ldap/ldap v3.2.4 -> v3.3.0

* github.com/go-redis/redis v8.6.0 -> v8.8.2

* github.com/go-sql-driver/mysql v1.5.0 -> v1.6.0

* github.com/go-swagger/go-swagger v0.26.1 -> v0.27.0

* github.com/lib/pq v1.9.0 -> v1.10.1

* github.com/mattn/go-sqlite3 v1.14.6 -> v1.14.7

* github.com/go-testfixtures/testfixtures v3.5.0 -> v3.6.0

* github.com/issue9/identicon v1.0.1 -> v1.2.0

* github.com/klauspost/compress v1.11.8 -> v1.12.1

* github.com/mgechev/revive v1.0.3 -> v1.0.6

* github.com/microcosm-cc/bluemonday v1.0.7 -> v1.0.8

* github.com/niklasfasching/go-org v1.4.0 -> v1.5.0

* github.com/olivere/elastic v7.0.22 -> v7.0.24

* github.com/pelletier/go-toml v1.8.1 -> v1.9.0

* github.com/prometheus/client_golang v1.9.0 -> v1.10.0

* github.com/xanzy/go-gitlab v0.44.0 -> v0.48.0

* github.com/yuin/goldmark v1.3.3 -> v1.3.5

* github.com/6543/go-version v1.2.4 -> v1.3.1

* do github.com/lib/pq v1.10.0 -> v1.10.1 again ...
2021-04-22 20:08:53 -04:00

4.3 KiB
Vendored

Changelog

❤️
Uptrace.dev - All-in-one tool to optimize performance and monitor errors & logs

v8.8

  • To make updating easier, extra modules now have the same version as go-redis does. That means that
    you need to update your imports:
github.com/go-redis/redis/extra/redisotel -> github.com/go-redis/redis/extra/redisotel/v8
github.com/go-redis/redis/extra/rediscensus -> github.com/go-redis/redis/extra/rediscensus/v8

v8.5

  • knadh contributed long-awaited ability to scan Redis Hash into a
    struct:
err := rdb.HGetAll(ctx, "hash").Scan(&data)

err := rdb.MGet(ctx, "key1", "key2").Scan(&data)

v8

  • All commands require context.Context as a first argument, e.g. rdb.Ping(ctx). If you are not
    using context.Context yet, the simplest option is to define global package variable
    var ctx = context.TODO() and use it when ctx is required.

  • Full support for context.Context canceling.

  • Added redis.NewFailoverClusterClient that supports routing read-only commands to a slave node.

  • Added redisext.OpenTemetryHook that adds
    Redis OpenTelemetry instrumentation.

  • Redis slow log support.

  • Ring uses Rendezvous Hashing by default which provides better distribution. You need to move
    existing keys to a new location or keys will be inaccessible / lost. To use old hashing scheme:

import "github.com/golang/groupcache/consistenthash"

ring := redis.NewRing(&redis.RingOptions{
    NewConsistentHash: func() {
        return consistenthash.New(100, crc32.ChecksumIEEE)
    },
})
  • ClusterOptions.MaxRedirects default value is changed from 8 to 3.

  • Options.MaxRetries default value is changed from 0 to 3.

  • Cluster.ForEachNode is renamed to ForEachShard for consistency with Ring.

v7.3

  • New option Options.Username which causes client to use AuthACL. Be aware if your connection
    URL contains username.

v7.2

  • Existing HMSet is renamed to HSet and old deprecated HMSet is restored for Redis 3 users.

v7.1

  • Existing Cmd.String is renamed to Cmd.Text. New Cmd.String implements fmt.Stringer
    interface.

v7

  • Important. Tx.Pipeline now returns a non-transactional pipeline. Use Tx.TxPipeline for a
    transactional pipeline.
  • WrapProcess is replaced with more convenient AddHook that has access to context.Context.
  • WithContext now can not be used to create a shallow copy of the client.
  • New methods ProcessContext, DoContext, and ExecContext.
  • Client respects Context.Deadline when setting net.Conn deadline.
  • Client listens on Context.Done while waiting for a connection from the pool and returns an error
    when context context is cancelled.
  • Add PubSub.ChannelWithSubscriptions that sends *Subscription in addition to *Message to allow
    detecting reconnections.
  • time.Time is now marshalled in RFC3339 format. rdb.Get("foo").Time() helper is added to parse
    the time.
  • SetLimiter is removed and added Options.Limiter instead.
  • HMSet is deprecated as of Redis v4.

v6.15

  • Cluster and Ring pipelines process commands for each node in its own goroutine.

6.14

  • Added Options.MinIdleConns.
  • Added Options.MaxConnAge.
  • PoolStats.FreeConns is renamed to PoolStats.IdleConns.
  • Add Client.Do to simplify creating custom commands.
  • Add Cmd.String, Cmd.Int, Cmd.Int64, Cmd.Uint64, Cmd.Float64, and Cmd.Bool helpers.
  • Lower memory usage.

v6.13

  • Ring got new options called HashReplicas and Hash. It is recommended to set
    HashReplicas = 1000 for better keys distribution between shards.
  • Cluster client was optimized to use much less memory when reloading cluster state.
  • PubSub.ReceiveMessage is re-worked to not use ReceiveTimeout so it does not lose data when timeout
    occurres. In most cases it is recommended to use PubSub.Channel instead.
  • Dialer.KeepAlive is set to 5 minutes by default.

v6.12