commit | d2188b76212d8aae675936042a7b13e45f46bb9d | [log] [tgz] |
---|---|---|
author | Bogdan Caprita <caprita@google.com> | Fri May 22 12:31:48 2015 -0700 |
committer | Bogdan Caprita <caprita@google.com> | Fri May 22 12:32:02 2015 -0700 |
tree | cf53f217e11b2bcafc35d29f73335149c2aac6dd | |
parent | 06c85efe016e08d07909526dd716d3aa8eeef267 [diff] |
services/device/device: globify the update command Remove the old cmdUpdate and cmdUpdateAll, and add a shiny new cmdUpdate in its own file (update.go) that uses the glob support. The implementation borrows code from what used to be updateall.go: instanceIsRunning() is mostly unchanged; updateInstance() and updateInstallation() are altered (dare I say improved and simplified). Also add a unit test which previously didn't exist. Supporting changes to glob.go: add context to globHandler (needed if the handler is to make RPCs) add flag to control handler parallelism; three modes are supported: 1. all handlers are run in parallel 2. all handlers are run sequentially, according to the sort order 3. run all installation handlers first (in parallel), then run all instance handlers (in parallel) Modes 2. and 3. are useful for the update command (where we may want more control on the order of the updates, e.g. do installation before instance) change the error reporting strategy: the errors from handlers are printed to the stderr buffer for the respective handler (to ensure grouping with any other stderr output in the handler); the run() method itself only returns a summary of the number of errors encountered. add device service as an option besides installation and instance (since the device service object occasionally acts like an instance and other times like an installation); also, we want to sort it deterministically in the glob results. MultiPart: 2/2 Change-Id: I483255b522295e7de06facdfab0e5b29a4cc0bd1
This repository contains a reference implementation of the Vanadium APIs.
Unlike the APIs in https://github.com/vanadium/go.v23, which promises to provide backward compatibility this repository makes no such promises.