mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-02 03:27:54 +00:00
Add context to storage backends and wire it through a lot of places (#3817)
This commit is contained in:
committed by
Jeff Mitchell
parent
2864fbd697
commit
8142b42d95
@@ -34,7 +34,7 @@ func (b *backend) pathCredsCreateRead(ctx context.Context, req *logical.Request,
|
||||
name := data.Get("name").(string)
|
||||
|
||||
// Get the role
|
||||
role, err := b.Role(req.Storage, name)
|
||||
role, err := b.Role(ctx, req.Storage, name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -43,7 +43,7 @@ func (b *backend) pathCredsCreateRead(ctx context.Context, req *logical.Request,
|
||||
}
|
||||
|
||||
// Determine if we have a lease configuration
|
||||
leaseConfig, err := b.LeaseConfig(req.Storage)
|
||||
leaseConfig, err := b.LeaseConfig(ctx, req.Storage)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -67,7 +67,7 @@ func (b *backend) pathCredsCreateRead(ctx context.Context, req *logical.Request,
|
||||
}
|
||||
|
||||
// Get our handle
|
||||
db, err := b.DB(req.Storage)
|
||||
db, err := b.DB(ctx, req.Storage)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user