mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-02 11:38:02 +00:00
Grace is deprecated so mark as such
This commit is contained in:
@@ -64,9 +64,7 @@ type RenewerInput struct {
|
|||||||
// Secret is the secret to renew
|
// Secret is the secret to renew
|
||||||
Secret *Secret
|
Secret *Secret
|
||||||
|
|
||||||
// Grace is a minimum renewal before returning so the upstream client
|
// DEPRECATED: this does not do anything.
|
||||||
// can do a re-read. This can be used to prevent clients from waiting
|
|
||||||
// too long to read a new credential and incur downtime.
|
|
||||||
Grace time.Duration
|
Grace time.Duration
|
||||||
|
|
||||||
// Rand is the randomizer to use for underlying randomization. If not
|
// Rand is the randomizer to use for underlying randomization. If not
|
||||||
@@ -107,8 +105,6 @@ func (c *Client) NewRenewer(i *RenewerInput) (*Renewer, error) {
|
|||||||
return nil, ErrRenewerMissingSecret
|
return nil, ErrRenewerMissingSecret
|
||||||
}
|
}
|
||||||
|
|
||||||
grace := i.Grace
|
|
||||||
|
|
||||||
random := i.Rand
|
random := i.Rand
|
||||||
if random == nil {
|
if random == nil {
|
||||||
random = rand.New(rand.NewSource(int64(time.Now().Nanosecond())))
|
random = rand.New(rand.NewSource(int64(time.Now().Nanosecond())))
|
||||||
@@ -122,7 +118,6 @@ func (c *Client) NewRenewer(i *RenewerInput) (*Renewer, error) {
|
|||||||
return &Renewer{
|
return &Renewer{
|
||||||
client: c,
|
client: c,
|
||||||
secret: secret,
|
secret: secret,
|
||||||
grace: grace,
|
|
||||||
increment: i.Increment,
|
increment: i.Increment,
|
||||||
random: random,
|
random: random,
|
||||||
doneCh: make(chan error, 1),
|
doneCh: make(chan error, 1),
|
||||||
|
|||||||
Reference in New Issue
Block a user