Rainbond/api/handler/pod_handler.go

19 lines
434 B
Go
Raw Normal View History

2019-08-21 15:07:20 +08:00
package handler
import (
"github.com/goodrain/rainbond/worker/client"
2019-08-23 15:55:40 +08:00
"github.com/goodrain/rainbond/worker/server/pb"
2019-08-21 15:07:20 +08:00
)
// PodHandler defines handler methods about k8s pods.
type PodHandler interface {
2019-08-23 15:55:40 +08:00
PodDetail(serviceID, podName string) (*pb.PodDetail, error)
2019-08-21 15:07:20 +08:00
}
// NewPodHandler creates a new PodHandler.
func NewPodHandler(statusCli *client.AppRuntimeSyncClient) PodHandler {
return &PodAction{
statusCli: statusCli,
}
}