Introduce ObjectConvertor for conversion to known API versions

Will allow clients to transform internal objects to a version
suitable for external output.
This commit is contained in:
Clayton Coleman
2014-11-01 18:38:02 -04:00
parent 2d54dfe249
commit 778a50d00b
4 changed files with 102 additions and 0 deletions

View File

@@ -33,6 +33,11 @@ type Codec interface {
Encoder
}
// ObjectConvertor converts an object to a different version.
type ObjectConvertor interface {
ConvertToVersion(in Object, outVersion string) (out Object, err error)
}
// ObjectTyper contains methods for extracting the APIVersion and Kind
// of objects.
type ObjectTyper interface {