blob: 06b45df66b56a283a5f63c55589be50c5937b5d1 [file] [log] [blame]
Matthias Andreas Benkard832a54e2019-01-29 09:27:38 +01001/*
2Copyright 2014 The Kubernetes Authors.
3
4Licensed under the Apache License, Version 2.0 (the "License");
5you may not use this file except in compliance with the License.
6You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10Unless required by applicable law or agreed to in writing, software
11distributed under the License is distributed on an "AS IS" BASIS,
12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13See the License for the specific language governing permissions and
14limitations under the License.
15*/
16
17// Package runtime includes helper functions for working with API objects
18// that follow the kubernetes API object conventions, which are:
19//
20// 0. Your API objects have a common metadata struct member, TypeMeta.
21// 1. Your code refers to an internal set of API objects.
22// 2. In a separate package, you have an external set of API objects.
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// 4. As your api evolves, you'll make an additional versioned package
27// with every major change.
28// 5. Versioned packages have conversion functions which convert to
29// and from the internal version.
30// 6. You'll continue to support older versions according to your
31// deprecation policy, and you can easily provide a program/library
32// to update old versions into new versions because of 5.
33// 7. All of your serializations and deserializations are handled in a
34// centralized place.
35//
36// Package runtime provides a conversion helper to make 5 easy, and the
37// Encode/Decode/DecodeInto trio to accomplish 7. You can also register
38// additional "codecs" which use a version of your choice. It's
39// recommended that you register your types with runtime in your
40// package's init function.
41//
42// As a bonus, a few common types useful from all api objects and versions
43// are provided in types.go.
44
45package runtime // import "k8s.io/apimachinery/pkg/runtime"