mirror of
https://github.com/turbot/steampipe.git
synced 2025-12-23 21:09:15 -05:00
Add HCL support for defining rate limiters, with filewatching as per connection config. Closes #3746
This commit is contained in:
@@ -18,7 +18,6 @@ import (
|
||||
"github.com/turbot/steampipe/pkg/connection"
|
||||
"github.com/turbot/steampipe/pkg/constants"
|
||||
"github.com/turbot/steampipe/pkg/constants/runtime"
|
||||
"github.com/turbot/steampipe/pkg/error_helpers"
|
||||
"github.com/turbot/steampipe/pkg/filepaths"
|
||||
"github.com/turbot/steampipe/pkg/pluginmanager_service"
|
||||
"github.com/turbot/steampipe/pkg/steampipeconfig"
|
||||
@@ -65,7 +64,7 @@ func runPluginManagerCmd(cmd *cobra.Command, _ []string) {
|
||||
configMap := connection.NewConnectionConfigMap(steampipeConfig.Connections)
|
||||
log.Printf("[TRACE] loaded config map: %s", strings.Join(steampipeConfig.ConnectionNames(), ","))
|
||||
|
||||
pluginManager, err := pluginmanager_service.NewPluginManager(configMap, logger)
|
||||
pluginManager, err := pluginmanager_service.NewPluginManager(ctx, configMap, steampipeConfig.Limiters, logger)
|
||||
if err != nil {
|
||||
log.Printf("[WARN] failed to create plugin manager: %s", err.Error())
|
||||
os.Exit(1)
|
||||
@@ -73,11 +72,9 @@ func runPluginManagerCmd(cmd *cobra.Command, _ []string) {
|
||||
|
||||
if shouldRunConnectionWatcher() {
|
||||
log.Printf("[INFO] starting connection watcher")
|
||||
|
||||
connectionWatcher, err := connection.NewConnectionWatcher(pluginManager.OnConnectionConfigChanged)
|
||||
if err != nil {
|
||||
log.Printf("[WARN] failed to create connection watcher: %s", err.Error())
|
||||
error_helpers.ShowError(ctx, err)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user