Rework push reservation w/ datastore

- At Handle creation, first check if an instance of the
  the respective object is already present in the datastore.
- Handle sequence must be saved only if commit
  to datastore is succesfull
- Caller (ipam) needs to manage the retry

Signed-off-by: Alessandro Boch <aboch@docker.com>
This commit is contained in:
Alessandro Boch
2015-06-17 16:49:21 -07:00
parent 0020b76d39
commit bca6ec2e64
4 changed files with 129 additions and 8 deletions
+1 -1
View File
@@ -19,7 +19,7 @@ func (h *Handle) KeyPrefix() []string {
return []string{h.App}
}
// Value marshala the data to be stored in the KV store
// Value marshals the data to be stored in the KV store
func (h *Handle) Value() []byte {
h.Lock()
defer h.Unlock()