summaryrefslogtreecommitdiffstats
path: root/src/dkv/api/backendPropertiesConnection.go
diff options
context:
space:
mode:
authorShashank Kumar Shankar <shashank.kumar.shankar@intel.com>2018-03-20 16:48:05 -0700
committerShashank Kumar Shankar <shashank.kumar.shankar@intel.com>2018-03-22 16:42:43 -0700
commit7dd6e2f9e3725427c628b214cb31bda1dbe95234 (patch)
tree3d76c2aed17003fb13d7ca734ff63e2ff99d63b6 /src/dkv/api/backendPropertiesConnection.go
parent1f99187b2ec49a132bd82b40bc4cd02d79cbd416 (diff)
Make datastore generic to support Consul/Cassandra
This patch makes the backend datastore to be generic so that the backend datastore can be either Consul or Cassandra. This way, MUSIC's core functionality can be used and makes other minor fixes. Change-Id: Iba4eaa751fe60a293d6f2fd60ad06a8c4be1dd1e Issue-ID: MUSIC-55 Signed-off-by: Shashank Kumar Shankar <shashank.kumar.shankar@intel.com>
Diffstat (limited to 'src/dkv/api/backendPropertiesConnection.go')
-rw-r--r--src/dkv/api/backendPropertiesConnection.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/dkv/api/backendPropertiesConnection.go b/src/dkv/api/backendPropertiesConnection.go
index d485b40..df9683b 100644
--- a/src/dkv/api/backendPropertiesConnection.go
+++ b/src/dkv/api/backendPropertiesConnection.go
@@ -34,8 +34,6 @@ type KeyValuesInterface interface {
type KeyValuesStruct struct{}
-var KeyValues KeyValuesInterface
-
func (kvStruct *KeyValuesStruct) WriteKVsToConsul(token string, subdomain string, kvs map[string]string) error {
var prefix = ""
if subdomain != "" {
@@ -45,7 +43,7 @@ func (kvStruct *KeyValuesStruct) WriteKVsToConsul(token string, subdomain string
}
for key, value := range kvs {
key = prefix + key
- err := Consul.RequestPUT(key, value)
+ err := Datastore.RequestPUT(key, value)
if err != nil {
return err
}