doc.go 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*
  2. Copyright 2014 The Kubernetes Authors.
  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. // +k8s:openapi-model-package=io.k8s.apimachinery.pkg.runtime
  14. // Package runtime includes helper functions for working with API objects
  15. // that follow the kubernetes API object conventions, which are:
  16. //
  17. // 0. Your API objects have a common metadata struct member, TypeMeta.
  18. //
  19. // 1. Your code refers to an internal set of API objects.
  20. //
  21. // 2. In a separate package, you have an external set of API objects.
  22. //
  23. // 3. The external set is considered to be versioned, and no breaking
  24. // changes are ever made to it (fields may be added but not changed
  25. // or removed).
  26. //
  27. // 4. As your api evolves, you'll make an additional versioned package
  28. // with every major change.
  29. //
  30. // 5. Versioned packages have conversion functions which convert to
  31. // and from the internal version.
  32. //
  33. // 6. You'll continue to support older versions according to your
  34. // deprecation policy, and you can easily provide a program/library
  35. // to update old versions into new versions because of 5.
  36. //
  37. // 7. All of your serializations and deserializations are handled in a
  38. // centralized place.
  39. //
  40. // Package runtime provides a conversion helper to make 5 easy, and the
  41. // Encode/Decode/DecodeInto trio to accomplish 7. You can also register
  42. // additional "codecs" which use a version of your choice. It's
  43. // recommended that you register your types with runtime in your
  44. // package's init function.
  45. //
  46. // As a bonus, a few common types useful from all api objects and versions
  47. // are provided in types.go.
  48. package runtime