summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/dkv/api/backendFilesystemConnection.go5
-rw-r--r--src/dkv/api/initialise.go8
2 files changed, 11 insertions, 2 deletions
diff --git a/src/dkv/api/backendFilesystemConnection.go b/src/dkv/api/backendFilesystemConnection.go
index f09e74f..e6c37ab 100644
--- a/src/dkv/api/backendFilesystemConnection.go
+++ b/src/dkv/api/backendFilesystemConnection.go
@@ -44,10 +44,11 @@ type DirectoryStruct struct {
}
const (
- MOUNTPATH = "../../mountpath/"
- JSONPATH = "api/token_service_map.json"
+ JSONPATH = "api/token_service_map.json"
)
+var MOUNTPATH = ""
+
var Directory DirectoryOperationer
func (d *DirectoryStruct) CreateService(body CreateRegisterServiceBody) (string, error) {
diff --git a/src/dkv/api/initialise.go b/src/dkv/api/initialise.go
index 824ca81..dfbcbde 100644
--- a/src/dkv/api/initialise.go
+++ b/src/dkv/api/initialise.go
@@ -16,6 +16,8 @@
package api
+import "os"
+
func Initialise() error {
Consul = &ConsulStruct{}
KeyValues = &KeyValuesStruct{kvs: make(map[string]string)}
@@ -31,5 +33,11 @@ func Initialise() error {
return err
}
+ if os.Getenv("MOUNTPATH") != "" {
+ MOUNTPATH = os.Getenv("MOUNTPATH")
+ } else {
+ MOUNTPATH = "../../mountpath/"
+ }
+
return nil
}