mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 13:37:30 +00:00
Merge pull request #12271 from pweil-/expose-codec
expose codec in storage
This commit is contained in:
commit
ad3876c16a
@ -72,6 +72,11 @@ func init() {
|
|||||||
metrics.Register()
|
metrics.Register()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Codec provides access to the underlying codec being used by the implementation.
|
||||||
|
func (h *etcdHelper) Codec() runtime.Codec {
|
||||||
|
return h.codec
|
||||||
|
}
|
||||||
|
|
||||||
// Implements storage.Interface.
|
// Implements storage.Interface.
|
||||||
func (h *etcdHelper) Backends() []string {
|
func (h *etcdHelper) Backends() []string {
|
||||||
return h.client.GetCluster()
|
return h.client.GetCluster()
|
||||||
|
@ -69,7 +69,7 @@ func Everything(runtime.Object) bool {
|
|||||||
type UpdateFunc func(input runtime.Object, res ResponseMeta) (output runtime.Object, ttl *uint64, err error)
|
type UpdateFunc func(input runtime.Object, res ResponseMeta) (output runtime.Object, ttl *uint64, err error)
|
||||||
|
|
||||||
// Interface offers a common interface for object marshaling/unmarshling operations and
|
// Interface offers a common interface for object marshaling/unmarshling operations and
|
||||||
// hids all the storage-related operations behind it.
|
// hides all the storage-related operations behind it.
|
||||||
type Interface interface {
|
type Interface interface {
|
||||||
// Returns list of servers addresses of the underyling database.
|
// Returns list of servers addresses of the underyling database.
|
||||||
// TODO: This method is used only in a single place. Consider refactoring and getting rid
|
// TODO: This method is used only in a single place. Consider refactoring and getting rid
|
||||||
@ -146,4 +146,7 @@ type Interface interface {
|
|||||||
// }
|
// }
|
||||||
// })
|
// })
|
||||||
GuaranteedUpdate(key string, ptrToType runtime.Object, ignoreNotFound bool, tryUpdate UpdateFunc) error
|
GuaranteedUpdate(key string, ptrToType runtime.Object, ignoreNotFound bool, tryUpdate UpdateFunc) error
|
||||||
|
|
||||||
|
// Codec provides access to the underlying codec being used by the implementation.
|
||||||
|
Codec() runtime.Codec
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user