diff options
author | Shashank Kumar Shankar <shashank.kumar.shankar@intel.com> | 2018-05-14 15:07:47 -0700 |
---|---|---|
committer | Shashank Kumar Shankar <shashank.kumar.shankar@intel.com> | 2018-05-14 15:07:47 -0700 |
commit | 5ffc6a77d8b5dbfd443828ac9bda285e44a630df (patch) | |
tree | 96db17129ef0612c0a712ff000c14603d5bacf01 /src/dkv/api/backendPropertiesConnection.go | |
parent | 9572f152aca0945cc104576054f36950363b9dac (diff) |
Add MUSIC Cassandra Datastore placeholder
This patch adds placeholder code for MUSIC Cassandra Datastore.
Change-Id: I8c55a73e67b49e8e4cde665a9d362d3561a77266
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.go | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/dkv/api/backendPropertiesConnection.go b/src/dkv/api/backendPropertiesConnection.go index df9683b..93ea255 100644 --- a/src/dkv/api/backendPropertiesConnection.go +++ b/src/dkv/api/backendPropertiesConnection.go @@ -25,7 +25,7 @@ import ( ) type KeyValuesInterface interface { - WriteKVsToConsul(string, string, map[string]string) error + WriteKVsToDatastore(string, string, map[string]string) error ConfigReader(string, string, string) (map[string]string, error) ReadMultiplePropertiesRecursive(string, *map[string]string) error ReadMultipleProperties(string, *map[string]string) error @@ -34,16 +34,15 @@ type KeyValuesInterface interface { type KeyValuesStruct struct{} -func (kvStruct *KeyValuesStruct) WriteKVsToConsul(token string, subdomain string, kvs map[string]string) error { +func (kvStruct *KeyValuesStruct) WriteKVsToDatastore(token string, subdomain string, kvs map[string]string) error { var prefix = "" if subdomain != "" { - prefix += token + "/" + subdomain + prefix += token + "/" + subdomain + "/" } else { prefix += token + "/" } for key, value := range kvs { - key = prefix + key - err := Datastore.RequestPUT(key, value) + err := Datastore.RequestPUT(prefix, key, value) if err != nil { return err } |