mirror of
https://github.com/cirruslabs/orchard.git
synced 2026-09-30 03:51:43 +02:00
API: introduce ability to watch a VM (#351)
* API: introduce ability to watch a VM
* Document ?watch=true for GET /vms/{name} in the OpenAPI specification
* WatchVM: ensure that goroutine is terminated on early return with error
* WatchVM: close channels on goroutine exit
* WatchVM: ensure that we wait for the goroutine after additional barriers
* WatchVM: ignore unexpected keys instead of throwing an error
* WatchVM: perform context-aware writes to a bounded channel
* WatchVM: don't forget to close errCh on goroutine exit too
* WatchVM: don't close readyCh in goroutine to avoid ambiguity
* WatchVM: filter out spurious KVs that signify VM deletion
This commit is contained in:
@@ -16,6 +16,9 @@ type Meta struct {
|
||||
// It is populated by the Controller with the current time
|
||||
// when receiving a POST request.
|
||||
CreatedAt time.Time `json:"createdAt,omitempty"`
|
||||
|
||||
// Version is a resource version used internally to implement WatchVM().
|
||||
Version uint64 `json:"version,omitempty"`
|
||||
}
|
||||
|
||||
type VM struct {
|
||||
|
||||
Reference in New Issue
Block a user