mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-10-29 17:52:32 +00:00
Add autopilot automated upgrades and redundancy zones (#15521)
This commit is contained in:
@@ -608,7 +608,7 @@ func (c *Client) CloneConfig() *Config {
|
||||
return newConfig
|
||||
}
|
||||
|
||||
// Sets the address of Vault in the client. The format of address should be
|
||||
// SetAddress sets the address of Vault in the client. The format of address should be
|
||||
// "<Scheme>://<Host>:<Port>". Setting this on a client will override the
|
||||
// value of VAULT_ADDR environment variable.
|
||||
func (c *Client) SetAddress(addr string) error {
|
||||
@@ -635,6 +635,16 @@ func (c *Client) Address() string {
|
||||
return c.addr.String()
|
||||
}
|
||||
|
||||
func (c *Client) SetCheckRedirect(f func(*http.Request, []*http.Request) error) {
|
||||
c.modifyLock.Lock()
|
||||
defer c.modifyLock.Unlock()
|
||||
|
||||
c.config.modifyLock.Lock()
|
||||
defer c.config.modifyLock.Unlock()
|
||||
|
||||
c.config.HttpClient.CheckRedirect = f
|
||||
}
|
||||
|
||||
// SetLimiter will set the rate limiter for this client.
|
||||
// This method is thread-safe.
|
||||
// rateLimit and burst are specified according to https://godoc.org/golang.org/x/time/rate#NewLimiter
|
||||
|
||||
Reference in New Issue
Block a user