Pass context to all statemgr.Locker operations (#789)

Signed-off-by: Marcin Wyszynski <marcin.pixie@gmail.com>
This commit is contained in:
Marcin Wyszynski
2023-10-25 14:22:11 +02:00
committed by GitHub
parent 275dd116f9
commit 772ac1fc35
58 changed files with 300 additions and 308 deletions

View File

@@ -38,10 +38,9 @@ type Backend struct {
*schema.Backend
credential *common.Credential
cosContext context.Context
cosClient *cos.Client
tagClient *tag.Client
stsClient *sts.Client
cosClient *cos.Client
tagClient *tag.Client
stsClient *sts.Client
region string
bucket string
@@ -207,8 +206,7 @@ func (b *Backend) configure(ctx context.Context) error {
return nil
}
b.cosContext = ctx
data := schema.FromContextBackendConfig(b.cosContext)
data := schema.FromContextBackendConfig(ctx)
b.region = data.Get("region").(string)
b.bucket = data.Get("bucket").(string)