updated to add persistence to provisioning and roll that through the rest of the services
Change-Id: Ia0d5a49dc0d88dbe6780c76483fd2247ad631bdf
diff --git a/provisioner/storage.go b/provisioner/storage.go
index b12b7ef..2d2fb6d 100644
--- a/provisioner/storage.go
+++ b/provisioner/storage.go
@@ -9,6 +9,7 @@
type Storage interface {
Put(id string, update StatusMsg) error
Get(id string) (*StatusMsg, error)
+ Delete(id string) error
List() ([]StatusMsg, error)
}
@@ -51,6 +52,11 @@
return &m, nil
}
+func (s *MemoryStorage) Delete(id string) error {
+ delete(s.Data, id)
+ return nil
+}
+
func (s *MemoryStorage) List() ([]StatusMsg, error) {
r := make([]StatusMsg, len(s.Data))
i := 0