feat: each provider can have its own timeout
providers.azure.timeout, providers.databricks.timeout and providers.repos.timeout override providers.timeout for that provider's requests; --timeout still sets them all. lazysecrets share, which reads a key and repo files, waits the longest of them.
This commit is contained in:
11 files changed
+106
-29
No files matched your search
@@ -123,7 +123,8 @@ type KeyRules struct {
|
||||
}
|
||||
|
||||
type Providers struct {
|
||||
// Timeout bounds each backend request; defaults to 30s.
|
||||
// Timeout bounds each backend request; defaults to 30s. Each
|
||||
// provider's own timeout overrides it for that provider.
|
||||
Timeout time.Duration `yaml:"timeout"`
|
||||
Azure Azure `yaml:"azure"`
|
||||
Databricks Databricks `yaml:"databricks"`
|
||||
@@ -134,6 +135,8 @@ type Providers struct {
|
||||
// that repo is the only one shown; elsewhere, the ones in Paths and under
|
||||
// Roots.
|
||||
type Repos struct {
|
||||
// Timeout overrides providers.timeout for these requests.
|
||||
Timeout time.Duration `yaml:"timeout"`
|
||||
// Enabled defaults to true.
|
||||
Enabled *bool `yaml:"enabled"`
|
||||
Paths []string `yaml:"paths"`
|
||||
@@ -148,6 +151,8 @@ type Repos struct {
|
||||
}
|
||||
|
||||
type Azure struct {
|
||||
// Timeout overrides providers.timeout for these requests.
|
||||
Timeout time.Duration `yaml:"timeout"`
|
||||
// Enabled defaults to true.
|
||||
Enabled *bool `yaml:"enabled"`
|
||||
// HideSubscriptions lists subscriptions to leave out, by name or ID.
|
||||
@@ -158,6 +163,8 @@ type Azure struct {
|
||||
}
|
||||
|
||||
type Databricks struct {
|
||||
// Timeout overrides providers.timeout for these requests.
|
||||
Timeout time.Duration `yaml:"timeout"`
|
||||
// Enabled defaults to true.
|
||||
Enabled *bool `yaml:"enabled"`
|
||||
HideProfiles []string `yaml:"hideProfiles"`
|
||||
|
||||
Reference in new issue
Block a user