Documentation
¶
Index ¶
- type ConfigChangeWatcher
- type ConfigFormat
- type DynamicConfig
- func (c *DynamicConfig) AddWatcher(watcher ConfigChangeWatcher)
- func (c *DynamicConfig) Delete(key string)
- func (c *DynamicConfig) Get(key string) (interface{}, bool)
- func (c *DynamicConfig) GetAll() map[string]interface{}
- func (c *DynamicConfig) GetBool(key string, defaultValue bool) bool
- func (c *DynamicConfig) GetInt(key string, defaultValue int) int
- func (c *DynamicConfig) GetString(key string, defaultValue string) string
- func (c *DynamicConfig) Load() error
- func (c *DynamicConfig) RemoveWatcher(watcher ConfigChangeWatcher)
- func (c *DynamicConfig) Save() error
- func (c *DynamicConfig) Set(key string, value interface{})
- func (c *DynamicConfig) SetAll(data map[string]interface{})
- func (c *DynamicConfig) StartWatcher(interval time.Duration) chan struct{}
- type FeatureFlag
- type FeatureFlagManager
- func (m *FeatureFlagManager) GetFlag(flag FeatureFlag) bool
- func (m *FeatureFlagManager) IsEnabled(flag FeatureFlag) bool
- func (m *FeatureFlagManager) ListFlags() map[FeatureFlag]bool
- func (m *FeatureFlagManager) LoadFromConfig(config map[string]interface{}) error
- func (m *FeatureFlagManager) SaveToConfig() map[string]interface{}
- func (m *FeatureFlagManager) SetFlag(flag FeatureFlag, enabled bool)
- type PythonExtensionsConfig
- func (c *PythonExtensionsConfig) DisableAllPythonExtensions()
- func (c *PythonExtensionsConfig) DisablePythonExtension(feature string)
- func (c *PythonExtensionsConfig) EnableAllPythonExtensions()
- func (c *PythonExtensionsConfig) EnablePythonExtension(feature string)
- func (c *PythonExtensionsConfig) IsPythonExtensionEnabled(feature string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigChangeWatcher ¶
type ConfigChangeWatcher interface {
OnConfigChange(newConfig map[string]interface{})
}
ConfigChangeWatcher is an interface for objects that want to be notified of config changes
type ConfigFormat ¶
type ConfigFormat string
ConfigFormat represents the format of a configuration file
const ( // JSONFormat represents JSON configuration format JSONFormat ConfigFormat = "json" // YAMLFormat represents YAML configuration format YAMLFormat ConfigFormat = "yaml" )
type DynamicConfig ¶
type DynamicConfig struct {
// contains filtered or unexported fields
}
DynamicConfig represents a configuration that can be dynamically loaded and reloaded
func NewDynamicConfig ¶
func NewDynamicConfig(filePath string, format ConfigFormat) (*DynamicConfig, error)
NewDynamicConfig creates a new dynamic configuration
func (*DynamicConfig) AddWatcher ¶
func (c *DynamicConfig) AddWatcher(watcher ConfigChangeWatcher)
AddWatcher adds a configuration change watcher
func (*DynamicConfig) Delete ¶
func (c *DynamicConfig) Delete(key string)
Delete deletes a configuration value
func (*DynamicConfig) Get ¶
func (c *DynamicConfig) Get(key string) (interface{}, bool)
Get gets a configuration value
func (*DynamicConfig) GetAll ¶
func (c *DynamicConfig) GetAll() map[string]interface{}
GetAll gets all configuration values
func (*DynamicConfig) GetBool ¶
func (c *DynamicConfig) GetBool(key string, defaultValue bool) bool
GetBool gets a boolean configuration value
func (*DynamicConfig) GetInt ¶
func (c *DynamicConfig) GetInt(key string, defaultValue int) int
GetInt gets an integer configuration value
func (*DynamicConfig) GetString ¶
func (c *DynamicConfig) GetString(key string, defaultValue string) string
GetString gets a string configuration value
func (*DynamicConfig) Load ¶
func (c *DynamicConfig) Load() error
Load loads the configuration from the file
func (*DynamicConfig) RemoveWatcher ¶
func (c *DynamicConfig) RemoveWatcher(watcher ConfigChangeWatcher)
RemoveWatcher removes a configuration change watcher
func (*DynamicConfig) Save ¶
func (c *DynamicConfig) Save() error
Save saves the configuration to the file
func (*DynamicConfig) Set ¶
func (c *DynamicConfig) Set(key string, value interface{})
Set sets a configuration value
func (*DynamicConfig) SetAll ¶
func (c *DynamicConfig) SetAll(data map[string]interface{})
SetAll sets all configuration values
func (*DynamicConfig) StartWatcher ¶
func (c *DynamicConfig) StartWatcher(interval time.Duration) chan struct{}
StartWatcher starts a goroutine that watches for configuration changes
type FeatureFlag ¶
type FeatureFlag string
FeatureFlag represents a feature flag that can be toggled
const ( // FeatureFlagWebhooks enables webhook functionality FeatureFlagWebhooks FeatureFlag = "webhooks" // FeatureFlagPlugins enables plugin functionality FeatureFlagPlugins FeatureFlag = "plugins" // FeatureFlagAdvancedMetrics enables advanced metrics collection FeatureFlagAdvancedMetrics FeatureFlag = "advanced_metrics" // FeatureFlagIntelligentAlerting enables intelligent alerting FeatureFlagIntelligentAlerting FeatureFlag = "intelligent_alerting" // FeatureFlagMultiFormat enables multi-format support FeatureFlagMultiFormat FeatureFlag = "multi_format" )
const ( // FeatureFlagPythonExtensions enables all Python-based features FeatureFlagPythonExtensions FeatureFlag = "python_extensions" // FeatureFlagMLAnomalyDetection enables ML-based anomaly detection FeatureFlagMLAnomalyDetection FeatureFlag = "ml_anomaly_detection" // FeatureFlagAdvancedDeltaLake enables advanced Delta Lake features FeatureFlagAdvancedDeltaLake FeatureFlag = "advanced_delta_lake" // FeatureFlagAdvancedVisualization enables advanced visualization components FeatureFlagAdvancedVisualization FeatureFlag = "advanced_visualization" )
Python extensions related feature flags
type FeatureFlagManager ¶
type FeatureFlagManager struct {
// contains filtered or unexported fields
}
FeatureFlagManager manages feature flags
func NewFeatureFlagManager ¶
func NewFeatureFlagManager() *FeatureFlagManager
NewFeatureFlagManager creates a new feature flag manager
func (*FeatureFlagManager) GetFlag ¶
func (m *FeatureFlagManager) GetFlag(flag FeatureFlag) bool
GetFlag gets a feature flag
func (*FeatureFlagManager) IsEnabled ¶
func (m *FeatureFlagManager) IsEnabled(flag FeatureFlag) bool
IsEnabled checks if a feature flag is enabled
func (*FeatureFlagManager) ListFlags ¶
func (m *FeatureFlagManager) ListFlags() map[FeatureFlag]bool
ListFlags lists all feature flags
func (*FeatureFlagManager) LoadFromConfig ¶
func (m *FeatureFlagManager) LoadFromConfig(config map[string]interface{}) error
LoadFromConfig loads feature flags from configuration
func (*FeatureFlagManager) SaveToConfig ¶
func (m *FeatureFlagManager) SaveToConfig() map[string]interface{}
SaveToConfig saves feature flags to configuration
func (*FeatureFlagManager) SetFlag ¶
func (m *FeatureFlagManager) SetFlag(flag FeatureFlag, enabled bool)
SetFlag sets a feature flag
type PythonExtensionsConfig ¶
type PythonExtensionsConfig struct {
// Enabled indicates if Python extensions are enabled
Enabled bool `json:"enabled" yaml:"enabled"`
// PythonPath is the path to the Python executable
PythonPath string `json:"python_path" yaml:"python_path"`
// RequiredPackages is a list of required Python packages
RequiredPackages []string `json:"required_packages" yaml:"required_packages"`
// Features is a map of feature names to their enabled status
Features map[string]bool `json:"features" yaml:"features"`
}
PythonExtensionsConfig represents configuration for Python extensions
func NewDefaultPythonExtensionsConfig ¶
func NewDefaultPythonExtensionsConfig() *PythonExtensionsConfig
NewDefaultPythonExtensionsConfig creates a new PythonExtensionsConfig with default values
func (*PythonExtensionsConfig) DisableAllPythonExtensions ¶
func (c *PythonExtensionsConfig) DisableAllPythonExtensions()
DisableAllPythonExtensions disables all Python extension features
func (*PythonExtensionsConfig) DisablePythonExtension ¶
func (c *PythonExtensionsConfig) DisablePythonExtension(feature string)
DisablePythonExtension disables a specific Python extension feature
func (*PythonExtensionsConfig) EnableAllPythonExtensions ¶
func (c *PythonExtensionsConfig) EnableAllPythonExtensions()
EnableAllPythonExtensions enables all Python extension features
func (*PythonExtensionsConfig) EnablePythonExtension ¶
func (c *PythonExtensionsConfig) EnablePythonExtension(feature string)
EnablePythonExtension enables a specific Python extension feature
func (*PythonExtensionsConfig) IsPythonExtensionEnabled ¶
func (c *PythonExtensionsConfig) IsPythonExtensionEnabled(feature string) bool
IsPythonExtensionEnabled checks if a specific Python extension feature is enabled