summaryrefslogtreecommitdiffstats
path: root/src/k8splugin/internal/db/consul.go
diff options
context:
space:
mode:
authorKiran Kamineni <kiran.k.kamineni@intel.com>2019-03-27 11:54:55 -0700
committerKiran Kamineni <kiran.k.kamineni@intel.com>2019-03-27 14:06:02 -0700
commitb6288d59577dd40d6d19841bf030c45f9ec8aa50 (patch)
treea920be4c664076d88483dc3b2549c9f2016d2707 /src/k8splugin/internal/db/consul.go
parent1ab1af62578c1c2bf7b3b2e56827fe408cabdbb3 (diff)
Add update method to db interface
Add update interface to the db. This will allow us to support PUT http methods in the future. Issue-ID: MULTICLOUD-553 Change-Id: I7263d42e893734eadbdaf78022005d6004601772 Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
Diffstat (limited to 'src/k8splugin/internal/db/consul.go')
-rw-r--r--src/k8splugin/internal/db/consul.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/k8splugin/internal/db/consul.go b/src/k8splugin/internal/db/consul.go
index 23d2ae88..0977cfba 100644
--- a/src/k8splugin/internal/db/consul.go
+++ b/src/k8splugin/internal/db/consul.go
@@ -88,6 +88,11 @@ func (c *ConsulStore) Create(root string, key Key, tag string, data interface{})
return err
}
+// Update is used to update a DB entry
+func (c *ConsulStore) Update(root string, key Key, tag string, data interface{}) error {
+ return c.Create(root, key, tag, data)
+}
+
// Read method returns the internalID for a particular externalID
func (c *ConsulStore) Read(root string, key Key, tag string) ([]byte, error) {