diff options
Diffstat (limited to 'weed/filer/filer_conf.go')
| -rw-r--r-- | weed/filer/filer_conf.go | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/weed/filer/filer_conf.go b/weed/filer/filer_conf.go index 3e3e9f8a9..4f317371b 100644 --- a/weed/filer/filer_conf.go +++ b/weed/filer/filer_conf.go @@ -82,6 +82,18 @@ func (fc *FilerConf) AddLocationConf(locConf *filer_pb.FilerConf_PathConf) (err return } +func (fc *FilerConf) DeleteLocationConf(locationPrefix string) { + rules := ptrie.New() + fc.rules.Walk(func(key []byte, value interface{}) bool { + if string(key) == locationPrefix { + return true + } + rules.Put(key, value) + return true + }) + fc.rules = rules + return +} var ( EmptyFilerConfPathConf = &filer_pb.FilerConf_PathConf{} @@ -110,4 +122,4 @@ func (fc *FilerConf) ToProto() *filer_pb.FilerConf { func (fc *FilerConf) ToText(writer io.Writer) error { return proto.MarshalText(writer, fc.ToProto()) -}
\ No newline at end of file +} |
