Documentation ¶
Index ¶
- type ConfigManager
- func (m *ConfigManager) ApplyPendingChanges() error
- func (m *ConfigManager) AreChangesPending() bool
- func (m *ConfigManager) DiscardPendingConfig() error
- func (m *ConfigManager) GetCurrentConfig() config.Config
- func (m *ConfigManager) GetPendingChangelog() (diff.Changelog, error)
- func (m *ConfigManager) GetPendingConfig() config.Config
- func (m *ConfigManager) LoadCurrentConfigFromDisk() error
- func (m *ConfigManager) LoadDefaultConfig() error
- func (m *ConfigManager) LoadPendingConfigFromDisk() error
- func (m *ConfigManager) RegisterApplyFunction(fn func(currentConfig config.Config, pendingConfig config.Config) error)
- func (m *ConfigManager) SaveWithoutApplying() error
- func (m *ConfigManager) StartTransaction() (*ConfigTransaction, *config.Config)
- type ConfigTransaction
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigManager ¶
type ConfigManager struct {
// contains filtered or unexported fields
}
func CreateConfigManager ¶
func CreateConfigManager() *ConfigManager
func (*ConfigManager) ApplyPendingChanges ¶
func (m *ConfigManager) ApplyPendingChanges() error
ApplyPendingChanges Takes all pending Changes and Tries to Apply them using the Registered Apply Functions. In Case of error it Attempts to Revert to the Current Config
func (*ConfigManager) AreChangesPending ¶
func (m *ConfigManager) AreChangesPending() bool
func (*ConfigManager) DiscardPendingConfig ¶
func (m *ConfigManager) DiscardPendingConfig() error
func (*ConfigManager) GetCurrentConfig ¶
func (m *ConfigManager) GetCurrentConfig() config.Config
func (*ConfigManager) GetPendingChangelog ¶
func (m *ConfigManager) GetPendingChangelog() (diff.Changelog, error)
func (*ConfigManager) GetPendingConfig ¶
func (m *ConfigManager) GetPendingConfig() config.Config
func (*ConfigManager) LoadCurrentConfigFromDisk ¶
func (m *ConfigManager) LoadCurrentConfigFromDisk() error
func (*ConfigManager) LoadDefaultConfig ¶
func (m *ConfigManager) LoadDefaultConfig() error
func (*ConfigManager) LoadPendingConfigFromDisk ¶
func (m *ConfigManager) LoadPendingConfigFromDisk() error
func (*ConfigManager) RegisterApplyFunction ¶
func (*ConfigManager) SaveWithoutApplying ¶
func (m *ConfigManager) SaveWithoutApplying() error
func (*ConfigManager) StartTransaction ¶
func (m *ConfigManager) StartTransaction() (*ConfigTransaction, *config.Config)
type ConfigTransaction ¶
type ConfigTransaction struct {
// contains filtered or unexported fields
}
func (*ConfigTransaction) Commit ¶
func (t *ConfigTransaction) Commit() error
func (*ConfigTransaction) Discard ¶
func (t *ConfigTransaction) Discard()
Discard Discards the Transaction. Is a noop if The Transaction Already Finished due to a Commit() or another Discard()
Click to show internal directories.
Click to hide internal directories.