mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-11 06:02:18 +00:00
Use a strong type for UID fields
This commit is contained in:
@@ -32,8 +32,8 @@ type execActionHandler struct {
|
||||
kubelet *Kubelet
|
||||
}
|
||||
|
||||
func (e *execActionHandler) Run(podFullName, uuid string, container *api.Container, handler *api.Handler) error {
|
||||
_, err := e.kubelet.RunInContainer(podFullName, uuid, container.Name, handler.Exec.Command)
|
||||
func (e *execActionHandler) Run(podFullName string, uid util.UID, container *api.Container, handler *api.Handler) error {
|
||||
_, err := e.kubelet.RunInContainer(podFullName, uid, container.Name, handler.Exec.Command)
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -67,11 +67,11 @@ func ResolvePort(portReference util.IntOrString, container *api.Container) (int,
|
||||
return -1, fmt.Errorf("couldn't find port: %v in %v", portReference, container)
|
||||
}
|
||||
|
||||
func (h *httpActionHandler) Run(podFullName, uuid string, container *api.Container, handler *api.Handler) error {
|
||||
func (h *httpActionHandler) Run(podFullName string, uid util.UID, container *api.Container, handler *api.Handler) error {
|
||||
host := handler.HTTPGet.Host
|
||||
if len(host) == 0 {
|
||||
var info api.PodInfo
|
||||
info, err := h.kubelet.GetPodInfo(podFullName, uuid)
|
||||
info, err := h.kubelet.GetPodInfo(podFullName, uid)
|
||||
if err != nil {
|
||||
glog.Errorf("unable to get pod info, event handlers may be invalid.")
|
||||
return err
|
||||
|
Reference in New Issue
Block a user