Detect cancelled allocation more cleanly

to avoid the weave script trying to parse an error message as a CIDR
This commit is contained in:
Bryan Boreham committed 2015-09-16 14:14:40 +01:00
1 parent 1beaf79e47
commit 98b80c59d9
5 files changed
+26 -4

No files matched your search

+9
View File
@@ -184,6 +184,15 @@ func hasBeenCancelled(cancelChan <-chan bool) func() bool {
}
}
type errorCancelled struct {
kind string
ident string
}
func (e *errorCancelled) Error() string {
return fmt.Sprintf("%s request for %s cancelled", e.kind, e.ident)
}
// Actor client API
// Allocate (Sync) - get new IP address for container with given name in range