Documentation ¶
Overview ¶
Package file implements config center around file system.
Index ¶
- Constants
- func Home() (string, error)
- type CacheListener
- type FileSystemDynamicConfiguration
- func (fsdc *FileSystemDynamicConfiguration) AddListener(key string, listener config_center.ConfigurationListener, ...)
- func (fsdc *FileSystemDynamicConfiguration) Close() error
- func (fsdc *FileSystemDynamicConfiguration) GetConfigKeysByGroup(group string) (*gxset.HashSet, error)
- func (fsdc *FileSystemDynamicConfiguration) GetInternalProperty(key string, opts ...config_center.Option) (string, error)
- func (fsdc *FileSystemDynamicConfiguration) GetPath(key string, group string) string
- func (fsdc *FileSystemDynamicConfiguration) GetProperties(key string, opts ...config_center.Option) (string, error)
- func (fsdc *FileSystemDynamicConfiguration) GetRule(key string, opts ...config_center.Option) (string, error)
- func (fsdc *FileSystemDynamicConfiguration) Parser() parser.ConfigurationParser
- func (fsdc *FileSystemDynamicConfiguration) PublishConfig(key string, group string, value string) error
- func (fsdc *FileSystemDynamicConfiguration) RemoveConfig(key string, group string) error
- func (fsdc *FileSystemDynamicConfiguration) RemoveListener(key string, listener config_center.ConfigurationListener, ...)
- func (fsdc *FileSystemDynamicConfiguration) RootPath() string
- func (fsdc *FileSystemDynamicConfiguration) SetParser(p parser.ConfigurationParser)
Constants ¶
const ( ParamNamePrefix = "dubbo.config-center." ConfigCenterDirParamName = ParamNamePrefix + "dir" ConfigCenterEncodingParamName = ParamNamePrefix + "encoding" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CacheListener ¶
type CacheListener struct {
// contains filtered or unexported fields
}
CacheListener is file watcher
func NewCacheListener ¶
func NewCacheListener(rootPath string) *CacheListener
NewCacheListener creates a new CacheListener
func (*CacheListener) AddListener ¶
func (cl *CacheListener) AddListener(key string, listener config_center.ConfigurationListener)
AddListener will add a listener if loaded if you watcher a file or directory not exist, will error with no such file or directory
func (*CacheListener) Close ¶
func (cl *CacheListener) Close() error
Close will remove key listener and close watcher
func (*CacheListener) RemoveListener ¶
func (cl *CacheListener) RemoveListener(key string, listener config_center.ConfigurationListener)
RemoveListener will delete a listener if loaded
type FileSystemDynamicConfiguration ¶
type FileSystemDynamicConfiguration struct { config_center.BaseDynamicConfiguration // contains filtered or unexported fields }
func (*FileSystemDynamicConfiguration) AddListener ¶
func (fsdc *FileSystemDynamicConfiguration) AddListener(key string, listener config_center.ConfigurationListener, opts ...config_center.Option)
AddListener Add listener
func (*FileSystemDynamicConfiguration) Close ¶
func (fsdc *FileSystemDynamicConfiguration) Close() error
Close close file watcher
func (*FileSystemDynamicConfiguration) GetConfigKeysByGroup ¶
func (fsdc *FileSystemDynamicConfiguration) GetConfigKeysByGroup(group string) (*gxset.HashSet, error)
GetConfigKeysByGroup will return all keys with the group
func (*FileSystemDynamicConfiguration) GetInternalProperty ¶
func (fsdc *FileSystemDynamicConfiguration) GetInternalProperty(key string, opts ...config_center.Option) (string, error)
GetInternalProperty get value by key in Default properties file(dubbo.properties)
func (*FileSystemDynamicConfiguration) GetPath ¶
func (fsdc *FileSystemDynamicConfiguration) GetPath(key string, group string) string
GetPath get path
func (*FileSystemDynamicConfiguration) GetProperties ¶
func (fsdc *FileSystemDynamicConfiguration) GetProperties(key string, opts ...config_center.Option) (string, error)
GetProperties get properties file
func (*FileSystemDynamicConfiguration) GetRule ¶
func (fsdc *FileSystemDynamicConfiguration) GetRule(key string, opts ...config_center.Option) (string, error)
GetRule get Router rule properties file
func (*FileSystemDynamicConfiguration) Parser ¶
func (fsdc *FileSystemDynamicConfiguration) Parser() parser.ConfigurationParser
Parser Get Parser
func (*FileSystemDynamicConfiguration) PublishConfig ¶
func (fsdc *FileSystemDynamicConfiguration) PublishConfig(key string, group string, value string) error
PublishConfig will publish the config with the (key, group, value) pair
func (*FileSystemDynamicConfiguration) RemoveConfig ¶
func (fsdc *FileSystemDynamicConfiguration) RemoveConfig(key string, group string) error
RemoveConfig will remove tconfig_center/nacos/impl_testhe config whit hte (key, group)
func (*FileSystemDynamicConfiguration) RemoveListener ¶
func (fsdc *FileSystemDynamicConfiguration) RemoveListener(key string, listener config_center.ConfigurationListener, opts ...config_center.Option)
RemoveListener Remove listener
func (*FileSystemDynamicConfiguration) RootPath ¶
func (fsdc *FileSystemDynamicConfiguration) RootPath() string
RootPath get root path
func (*FileSystemDynamicConfiguration) SetParser ¶
func (fsdc *FileSystemDynamicConfiguration) SetParser(p parser.ConfigurationParser)
SetParser Set Parser