Documentation
¶
Index ¶
- type Feature
- type FeatureConfig
- type FeatureLoader
- func (fl *FeatureLoader) GetFeatureManager() *FeatureManager
- func (fl *FeatureLoader) GetFeatureStatus() map[string]interface{}
- func (fl *FeatureLoader) InitializeFeatures() error
- func (fl *FeatureLoader) LoadConfiguration() error
- func (fl *FeatureLoader) ReloadFeatures() error
- func (fl *FeatureLoader) StartFeatures() error
- func (fl *FeatureLoader) StopFeatures() error
- func (fl *FeatureLoader) ValidateConfiguration() error
- type FeatureManager
- func (fm *FeatureManager) DisableFeature(name string) error
- func (fm *FeatureManager) EnableFeature(name string) error
- func (fm *FeatureManager) GetFeature(name string) (Feature, bool)
- func (fm *FeatureManager) GetFeatureStatus() map[string]interface{}
- func (fm *FeatureManager) InitializeFeatures() error
- func (fm *FeatureManager) ListFeatures() []string
- func (fm *FeatureManager) LoadFeatures() error
- func (fm *FeatureManager) RegisterFeature(feature Feature) error
- func (fm *FeatureManager) ReloadAllFeatures() error
- func (fm *FeatureManager) ReloadFeature(name string) error
- func (fm *FeatureManager) SetFeatureConfig(name string, config map[string]interface{})
- func (fm *FeatureManager) StartFeatures() error
- func (fm *FeatureManager) StopFeatures() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Feature ¶
type Feature interface {
features.FeatureInterface
Start() error
Stop() error
Reload() error
CheckCompatibility(nodeVersion string) error
}
Feature interface that all features must implement
type FeatureConfig ¶
type FeatureConfig struct {
Features struct {
Enabled bool `toml:"enabled"`
AutoReload bool `toml:"auto_reload"`
CheckCompatibility bool `toml:"check_compatibility"`
QuantumSigning struct {
Enabled bool `toml:"enabled"`
DilithiumMode int `toml:"dilithium_mode"`
QuantumHeaders bool `toml:"quantum_headers"`
EnableMetrics bool `toml:"enable_metrics"`
MaxLatencyMs int `toml:"max_latency_ms"`
} `toml:"quantum_signing"`
StateSync struct {
Enabled bool `toml:"enabled"`
FastSync bool `toml:"fast_sync"`
ChunkSize int `toml:"chunk_size"`
MaxConcurrent int `toml:"max_concurrent"`
TimeoutSeconds int `toml:"timeout_seconds"`
} `toml:"state_sync"`
ZKRollup struct {
Enabled bool `toml:"enabled"`
EnableProofs bool `toml:"enable_proofs"`
EnableVerification bool `toml:"enable_verification"`
BatchSize int `toml:"batch_size"`
ProofTimeout int `toml:"proof_timeout"`
} `toml:"zk_rollup"`
Distribution struct {
UseGitSubmodules bool `toml:"use_git_submodules"`
AutoUpdate bool `toml:"auto_update"`
RepositoryURL string `toml:"repository_url"`
Branch string `toml:"branch"`
} `toml:"distribution"`
Compatibility struct {
MinNodeVersion string `toml:"min_node_version"`
MaxNodeVersion string `toml:"max_node_version"`
APIVersion string `toml:"api_version"`
} `toml:"compatibility"`
} `toml:"features"`
}
FeatureConfig represents the configuration for features
type FeatureLoader ¶
type FeatureLoader struct {
// contains filtered or unexported fields
}
FeatureLoader handles loading and managing features
func NewFeatureLoader ¶
func NewFeatureLoader(configPath string, nodeVersion string) *FeatureLoader
NewFeatureLoader creates a new feature loader
func (*FeatureLoader) GetFeatureManager ¶
func (fl *FeatureLoader) GetFeatureManager() *FeatureManager
GetFeatureManager returns the feature manager
func (*FeatureLoader) GetFeatureStatus ¶
func (fl *FeatureLoader) GetFeatureStatus() map[string]interface{}
GetFeatureStatus returns the status of all features
func (*FeatureLoader) InitializeFeatures ¶
func (fl *FeatureLoader) InitializeFeatures() error
InitializeFeatures initializes all features based on configuration
func (*FeatureLoader) LoadConfiguration ¶
func (fl *FeatureLoader) LoadConfiguration() error
LoadConfiguration loads the feature configuration from file
func (*FeatureLoader) ReloadFeatures ¶
func (fl *FeatureLoader) ReloadFeatures() error
ReloadFeatures reloads all features
func (*FeatureLoader) StartFeatures ¶
func (fl *FeatureLoader) StartFeatures() error
StartFeatures starts all enabled features
func (*FeatureLoader) StopFeatures ¶
func (fl *FeatureLoader) StopFeatures() error
StopFeatures stops all features
func (*FeatureLoader) ValidateConfiguration ¶
func (fl *FeatureLoader) ValidateConfiguration() error
ValidateConfiguration validates the feature configuration
type FeatureManager ¶
type FeatureManager struct {
// contains filtered or unexported fields
}
FeatureManager manages all features in the Fluentum node
func NewFeatureManager ¶
func NewFeatureManager(nodeVersion string) *FeatureManager
NewFeatureManager creates a new feature manager
func (*FeatureManager) DisableFeature ¶
func (fm *FeatureManager) DisableFeature(name string) error
DisableFeature disables a specific feature
func (*FeatureManager) EnableFeature ¶
func (fm *FeatureManager) EnableFeature(name string) error
EnableFeature enables a specific feature
func (*FeatureManager) GetFeature ¶
func (fm *FeatureManager) GetFeature(name string) (Feature, bool)
GetFeature returns a feature by name
func (*FeatureManager) GetFeatureStatus ¶
func (fm *FeatureManager) GetFeatureStatus() map[string]interface{}
GetFeatureStatus returns the status of all features
func (*FeatureManager) InitializeFeatures ¶
func (fm *FeatureManager) InitializeFeatures() error
InitializeFeatures initializes all features with their configurations
func (*FeatureManager) ListFeatures ¶
func (fm *FeatureManager) ListFeatures() []string
ListFeatures returns a list of all registered features
func (*FeatureManager) LoadFeatures ¶
func (fm *FeatureManager) LoadFeatures() error
LoadFeatures loads all available features
func (*FeatureManager) RegisterFeature ¶
func (fm *FeatureManager) RegisterFeature(feature Feature) error
RegisterFeature registers a feature with the manager
func (*FeatureManager) ReloadAllFeatures ¶
func (fm *FeatureManager) ReloadAllFeatures() error
ReloadAllFeatures reloads all features
func (*FeatureManager) ReloadFeature ¶
func (fm *FeatureManager) ReloadFeature(name string) error
ReloadFeature reloads a specific feature
func (*FeatureManager) SetFeatureConfig ¶
func (fm *FeatureManager) SetFeatureConfig(name string, config map[string]interface{})
SetFeatureConfig sets the configuration for a feature
func (*FeatureManager) StartFeatures ¶
func (fm *FeatureManager) StartFeatures() error
StartFeatures starts all enabled features
func (*FeatureManager) StopFeatures ¶
func (fm *FeatureManager) StopFeatures() error
StopFeatures stops all features