mirror of
https://github.com/hashicorp/vault.git
synced 2026-05-05 20:36:26 +02:00
Move renewer to internal package so tests don't barf
This commit is contained in:
parent
00982988bb
commit
f843c09dd1
@ -1,4 +1,4 @@
|
||||
package agent
|
||||
package agentint
|
||||
|
||||
import (
|
||||
"errors"
|
||||
@ -7,7 +7,7 @@ import (
|
||||
|
||||
hclog "github.com/hashicorp/go-hclog"
|
||||
"github.com/hashicorp/vault/api"
|
||||
"github.com/hashicorp/vault/command/agent"
|
||||
"github.com/hashicorp/vault/command/agent/agentint"
|
||||
"github.com/hashicorp/vault/sdk/helper/jsonutil"
|
||||
)
|
||||
|
||||
@ -100,7 +100,7 @@ func (ah *AuthHandler) Run(ctx context.Context, am AuthMethod) {
|
||||
credCh = make(chan struct{})
|
||||
}
|
||||
|
||||
var renewer *agent.Renewer
|
||||
var renewer *agentint.Renewer
|
||||
|
||||
for {
|
||||
select {
|
||||
@ -197,7 +197,7 @@ func (ah *AuthHandler) Run(ctx context.Context, am AuthMethod) {
|
||||
renewer.Stop()
|
||||
}
|
||||
|
||||
renewer, err = agent.NewRenewer(ah.client, &agent.RenewerInput{
|
||||
renewer, err = agentint.NewRenewer(ah.client, &agentint.RenewerInput{
|
||||
Secret: secret,
|
||||
})
|
||||
if err != nil {
|
||||
|
||||
4
command/agent/cache/lease_cache.go
vendored
4
command/agent/cache/lease_cache.go
vendored
@ -18,7 +18,7 @@ import (
|
||||
"github.com/hashicorp/errwrap"
|
||||
hclog "github.com/hashicorp/go-hclog"
|
||||
"github.com/hashicorp/vault/api"
|
||||
"github.com/hashicorp/vault/command/agent"
|
||||
"github.com/hashicorp/vault/command/agent/agentint"
|
||||
cachememdb "github.com/hashicorp/vault/command/agent/cache/cachememdb"
|
||||
"github.com/hashicorp/vault/helper/namespace"
|
||||
nshelper "github.com/hashicorp/vault/helper/namespace"
|
||||
@ -395,7 +395,7 @@ func (c *LeaseCache) startRenewing(ctx context.Context, index *cachememdb.Index,
|
||||
client.SetToken(req.Token)
|
||||
client.SetHeaders(req.Request.Header)
|
||||
|
||||
renewer, err := agent.NewRenewer(client, &agent.RenewerInput{
|
||||
renewer, err := agentint.NewRenewer(client, &agentint.RenewerInput{
|
||||
Secret: secret,
|
||||
})
|
||||
if err != nil {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user