doc.go 1.3 KB

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. Copyright (c) 2014 VMware, Inc. All Rights Reserved.
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. */
  13. package progress
  14. /*
  15. The progress package contains functionality to deal with progress reporting.
  16. The functionality is built to serve progress reporting for infrastructure
  17. operations when talking the vSphere API, but is generic enough to be used
  18. elsewhere.
  19. At the core of this progress reporting API lies the Sinker interface. This
  20. interface is implemented by any object that can act as a sink for progress
  21. reports. Callers of the Sink() function receives a send-only channel for
  22. progress reports. They are responsible for closing the channel when done.
  23. This semantic makes it easy to keep track of multiple progress report channels;
  24. they are only created when Sink() is called and assumed closed when any
  25. function that receives a Sinker parameter returns.
  26. */