Make DataVersionAndKind public on runtime.Scheme

Add a new ObjectTyper interface that clients can depend on for
converting between data and object to version and kind.
This commit is contained in:
Clayton Coleman
2014-10-29 12:10:55 -04:00
parent 3b76b25e7d
commit 58715527aa
3 changed files with 16 additions and 0 deletions

View File

@@ -47,6 +47,9 @@ func TestScheme(t *testing.T) {
scheme.AddKnownTypeWithName("", "Simple", &InternalSimple{})
scheme.AddKnownTypeWithName("externalVersion", "Simple", &ExternalSimple{})
// test that scheme is an ObjectTyper
var _ runtime.ObjectTyper = scheme
internalToExternalCalls := 0
externalToInternalCalls := 0