mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-13 11:25:19 +00:00
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:
@@ -33,6 +33,13 @@ type Codec interface {
|
||||
Encoder
|
||||
}
|
||||
|
||||
// ObjectTyper contains methods for extracting the APIVersion and Kind
|
||||
// of objects.
|
||||
type ObjectTyper interface {
|
||||
DataVersionAndKind([]byte) (version, kind string, err error)
|
||||
ObjectVersionAndKind(Object) (version, kind string, err error)
|
||||
}
|
||||
|
||||
// ResourceVersioner provides methods for setting and retrieving
|
||||
// the resource version from an API object.
|
||||
type ResourceVersioner interface {
|
||||
|
||||
Reference in New Issue
Block a user