Fix a breaking change to the API package introduced in #13835 (#14378)

`QueryDatacenterOptions` was renamed to `QueryFailoverOptions` without creating
an alias. This adds `QueryDatacenterOptions` back as an alias to
`QueryFailoverOptions` and marks it is deprecated.
This commit is contained in:
Eric Haberkorn 2022-08-29 16:59:27 -04:00 committed by GitHub
parent f5139f0c17
commit 13f8839924
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

5
.changelog/14378.txt Normal file
View File

@ -0,0 +1,5 @@
```release-note:bug
api: Fix a breaking change caused by renaming `QueryDatacenterOptions` to
`QueryFailoverOptions`. This adds `QueryDatacenterOptions` back as an alias to
`QueryFailoverOptions` and marks it as deprecated.
```

View File

@ -17,6 +17,9 @@ type QueryFailoverOptions struct {
Targets []QueryFailoverTarget Targets []QueryFailoverTarget
} }
// Deprecated: use QueryFailoverOptions instead.
type QueryDatacenterOptions = QueryFailoverOptions
type QueryFailoverTarget struct { type QueryFailoverTarget struct {
// PeerName specifies a peer to try during failover. // PeerName specifies a peer to try during failover.
PeerName string PeerName string