Below is documented all breaking changes between v3 and v4. There are further
enhancements which don't qualify as breaking changes which may not be documented
here.
Major Changes
Stop using ...opts pattern for optional parameters across all types, and
switch instead to a (Config{}).New kind of pattern.
Add MultiClient interface which is implemented by Sentinel and Cluster,
Client has been modified to be implemented only by clients which point at a
single redis instance (Conn and Pool). Methods on all affected
client types have been modified to fit these new interfaces.
Cluster.NewScanner has been replaced by ScannerConfig.NewMulti.
Conn has been completely re-designed. It is now always thread-safe. When
multiple Actions are performed against a single Conn concurrently the
Conn will automatically pipeline the Action's read/writes, as appropriate.
Pipeline has been re-designed as a result as well.
CmdAction has been removed.
Pool has been completely rewritten to better take advantage of connection
sharing (previously called "implicit pipelining" in v3) and the new Conn
design.
EvalScript and Pipeline now support connection sharing.
Since most Actions can be shared on the same Conn the Pool no longer
runs the risk of being depleted during too many concurrent Actions, and so
no longer needs to dynamically create/destroy Conns.
A Pool size of 0 is no longer supported.
Brand new resp/resp3 package which implements the [RESP3][resp3] protocol.
The new package features more consistent type mappings between go and redis
and support for streaming types.
Usage of context.Context in many places.
Add context.Context parameter to Client.Do, PubSub methods,
Scanner.Next, and WithConn.
Add context.Context parameter to all Client and Conn creation functions.
Add context.Context parameter to Action.Perform (previously called
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Bumps github.com/mediocregopher/radix/v4 from 4.0.0-beta.1 to 4.0.0.
Changelog
Sourced from github.com/mediocregopher/radix/v4's changelog.
... (truncated)
Commits
3e2d8e6
small documentation and example fixes80e06e5
update README to point to v3's README30c3db1
don't use net.ErrClosed yet, we're not off 1.15 yet309a7cb
Properly return errors from Pipeline, deal with discard in Conn betterd62fa1b
use net.JoinHostPort when constructing addr from cluster topo883255a
Merge pull request #285 from apersson/reader-err4642c5e
Fix TestConnDeadlineExceeded0f1c806
Do not close if err is resp.ErrConnUsable423af54
Fix typo0867f6d
Add Buffered() to resp.BufferedReaderDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)