Add autopilot automated upgrades and redundancy zones (#15521)

This commit is contained in:
Josh Black
2022-05-20 13:49:11 -07:00
committed by GitHub
parent f5fbba5c8b
commit de99f93820
23 changed files with 689 additions and 306 deletions

View File

@@ -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