MM-14143 config cleanup final (#10374)
* TestGetLicenseFileFromDisk: avoid using fileutils.FindConfigFile * config: abstract config-related file access, extend memory store * simplify config validate to avoid file knowledge * fix relative file tests * cluster: fix ConfigChanged event The old and new configurations were swapped when notifying the enterprise code of configuration changes, creating needless instability in propagating config updates across a cluster. * config/database: ignore duplicates * test cleanup * remove unnecessary Save() in test
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
3716918c57
Коммит
1e462da2d4
@@ -32,6 +32,19 @@ type Store interface {
|
||||
// RemoveListener removes a callback function using an id returned from AddListener.
|
||||
RemoveListener(id string)
|
||||
|
||||
// GetFile fetches the contents of a previously persisted configuration file.
|
||||
// If no such file exists, an empty byte array will be returned without error.
|
||||
GetFile(name string) ([]byte, error)
|
||||
|
||||
// SetFile sets or replaces the contents of a configuration file.
|
||||
SetFile(name string, data []byte) error
|
||||
|
||||
// HasFile returns true if the given file was previously persisted.
|
||||
HasFile(name string) (bool, error)
|
||||
|
||||
// RemoveFile removes a previously persisted configuration file.
|
||||
RemoveFile(name string) error
|
||||
|
||||
// String describes the backing store for the config.
|
||||
String() string
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user