Documentation
¶
Index ¶
- func SetGlobalConfigStoreService(service *ConfigStoreService)
- type ConfigStoreService
- func (s *ConfigStoreService) ActivateConfiguration(ctx context.Context, id, activatedBy string) error
- func (s *ConfigStoreService) CreateConfiguration(ctx context.Context, cfg *models.ConfigurationStore) (*models.ConfigurationStore, error)
- func (s *ConfigStoreService) GetActiveConfig() *models.ConfigurationStore
- func (s *ConfigStoreService) GetActiveConfiguration(ctx context.Context, name, environment string) (*models.ConfigurationStore, error)
- func (s *ConfigStoreService) GetConfiguration(ctx context.Context, id string) (*models.ConfigurationStore, error)
- func (s *ConfigStoreService) GetHistory(ctx context.Context, configID string, limit int) ([]*models.ConfigurationHistory, error)
- func (s *ConfigStoreService) ListConfigurations(ctx context.Context, name, environment string, ...) ([]*models.ConfigurationStore, error)
- func (s *ConfigStoreService) OnReload(callback func(*models.ConfigReloadEvent))
- func (s *ConfigStoreService) RollbackConfiguration(ctx context.Context, ...) error
- func (s *ConfigStoreService) UpdateConfiguration(ctx context.Context, id string, data map[string]interface{}, ...) (*models.ConfigurationStore, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetGlobalConfigStoreService ¶
func SetGlobalConfigStoreService(service *ConfigStoreService)
SetGlobalConfigStoreService sets the global config store service
Types ¶
type ConfigStoreService ¶
type ConfigStoreService struct {
// contains filtered or unexported fields
}
ConfigStoreService manages centralized configuration storage
func GetGlobalConfigStoreService ¶
func GetGlobalConfigStoreService() *ConfigStoreService
GetGlobalConfigStoreService returns the global config store service
func NewConfigStoreService ¶
func NewConfigStoreService(cfg *config.ConfigStoreConfig) (*ConfigStoreService, error)
NewConfigStoreService creates a new configuration store service
func (*ConfigStoreService) ActivateConfiguration ¶
func (s *ConfigStoreService) ActivateConfiguration(ctx context.Context, id, activatedBy string) error
ActivateConfiguration activates a configuration version
func (*ConfigStoreService) CreateConfiguration ¶
func (s *ConfigStoreService) CreateConfiguration(ctx context.Context, cfg *models.ConfigurationStore) (*models.ConfigurationStore, error)
CreateConfiguration creates a new configuration version
func (*ConfigStoreService) GetActiveConfig ¶
func (s *ConfigStoreService) GetActiveConfig() *models.ConfigurationStore
GetActiveConfig returns the cached active configuration
func (*ConfigStoreService) GetActiveConfiguration ¶
func (s *ConfigStoreService) GetActiveConfiguration(ctx context.Context, name, environment string) (*models.ConfigurationStore, error)
GetActiveConfiguration retrieves the active configuration for a name and environment
func (*ConfigStoreService) GetConfiguration ¶
func (s *ConfigStoreService) GetConfiguration(ctx context.Context, id string) (*models.ConfigurationStore, error)
GetConfiguration retrieves a configuration by ID
func (*ConfigStoreService) GetHistory ¶
func (s *ConfigStoreService) GetHistory(ctx context.Context, configID string, limit int) ([]*models.ConfigurationHistory, error)
GetHistory retrieves configuration history
func (*ConfigStoreService) ListConfigurations ¶
func (s *ConfigStoreService) ListConfigurations(ctx context.Context, name, environment string, status models.ConfigurationStatus) ([]*models.ConfigurationStore, error)
ListConfigurations lists configurations with optional filters
func (*ConfigStoreService) OnReload ¶
func (s *ConfigStoreService) OnReload(callback func(*models.ConfigReloadEvent))
OnReload registers a callback for configuration reload events
func (*ConfigStoreService) RollbackConfiguration ¶
func (s *ConfigStoreService) RollbackConfiguration(ctx context.Context, name, environment, targetVersion, performedBy, reason string) error
RollbackConfiguration rolls back to a previous version
func (*ConfigStoreService) UpdateConfiguration ¶
func (s *ConfigStoreService) UpdateConfiguration(ctx context.Context, id string, data map[string]interface{}, updatedBy, reason string) (*models.ConfigurationStore, error)
UpdateConfiguration updates a configuration