MCPcopy Create free account
hub / github.com/apache/dubbo-go / newFileSystemDynamicConfiguration

Function newFileSystemDynamicConfiguration

config_center/file/impl.go:65–85  ·  view source on GitHub ↗
(url *common.URL)

Source from the content-addressed store, hash-verified

63}
64
65func newFileSystemDynamicConfiguration(url *common.URL) (*FileSystemDynamicConfiguration, error) {
66 encode := url.GetParam(ConfigCenterEncodingParamName, defaultConfigCenterEncoding)
67
68 root := url.GetParam(ConfigCenterDirParamName, "")
69 var c *FileSystemDynamicConfiguration
70
71 root, err := mkdirIfNecessary(root)
72 if err != nil {
73 return nil, err
74 }
75
76 c = &FileSystemDynamicConfiguration{
77 url: url,
78 rootPath: root,
79 encoding: encode,
80 }
81
82 c.cacheListener = NewCacheListener(c.rootPath)
83
84 return c, nil
85}
86
87// RootPath get root path
88func (fsdc *FileSystemDynamicConfiguration) RootPath() string {

Callers 1

Calls 3

mkdirIfNecessaryFunction · 0.85
NewCacheListenerFunction · 0.70
GetParamMethod · 0.45

Tested by

no test coverage detected