/
githubmirror
/
terraform
Обзор
Документация
Войти
/
githubmirror
/
terraform
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
internal/pluginshared/cloudclient.go
34 строки
930 B
Radek Simko
make copyrightfix
17 фев 2026, 16:56
17 фев 2026, 16:56
0fe906f
Код
Авторство
О чём код?
// Copyright IBM Corp. 2014, 2026 // SPDX-License-Identifier: BUSL-1.1 package pluginshared import ( "context" "net/url" "github.com/hashicorp/go-retryablehttp" "github.com/hashicorp/terraform/internal/httpclient" "github.com/hashicorp/terraform/internal/logging" ) // NewCloudPluginClient creates a new client for downloading and verifying // terraform-cloudplugin archives func NewCloudPluginClient(ctx context.Context, serviceURL *url.URL) (*BasePluginClient, error) { httpClient := httpclient.New() httpClient.Timeout = defaultRequestTimeout retryableClient := retryablehttp.NewClient() retryableClient.HTTPClient = httpClient retryableClient.RetryMax = 3 retryableClient.RequestLogHook = requestLogHook retryableClient.Logger = logging.HCLogger() client := BasePluginClient{ ctx: ctx, serviceURL: serviceURL, httpClient: retryableClient, pluginName: "cloudplugin", } return &client, nil }