configstore

package
v0.0.0-...-99e730b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 13, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Index

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

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL