aboutsummaryrefslogtreecommitdiff
path: root/weed/filer2/configuration.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2018-06-17 13:01:57 -0700
committerChris Lu <chris.lu@gmail.com>2018-06-17 13:01:57 -0700
commiteb2acd11c229839cd8e955a70e4c0f61ead53777 (patch)
treef56f94f641b04ebc2be837e2a1137bccb974f126 /weed/filer2/configuration.go
parent0467195f07c80ec2da0c32206bf47d3e10772ac8 (diff)
downloadseaweedfs-eb2acd11c229839cd8e955a70e4c0f61ead53777.tar.xz
seaweedfs-eb2acd11c229839cd8e955a70e4c0f61ead53777.zip
decouple from viper for filer store
Diffstat (limited to 'weed/filer2/configuration.go')
-rw-r--r--weed/filer2/configuration.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/weed/filer2/configuration.go b/weed/filer2/configuration.go
index 46ed9e056..3c8a3675b 100644
--- a/weed/filer2/configuration.go
+++ b/weed/filer2/configuration.go
@@ -124,3 +124,13 @@ func (f *Filer) LoadConfiguration() {
os.Exit(-1)
}
+
+// A simplified interface to decouple from Viper
+type Configuration interface {
+ GetString(key string) string
+ GetBool(key string) bool
+ GetInt(key string) int
+ GetInt64(key string) int64
+ GetFloat64(key string) float64
+ GetStringSlice(key string) []string
+}