1 Star 0 Fork 0

liuxuezhan / go-plugins

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
kubernetes.go 807 Bytes
一键复制 编辑 原始数据 按行查看 历史
liuxuezhan 提交于 2021-08-18 17:35 . 'new'
package client
import "gitee.com/liuxuezhan/go-plugins/registry/kubernetes/client/watch"
// Kubernetes ...
type Kubernetes interface {
ListPods(labels map[string]string) (*PodList, error)
UpdatePod(podName string, pod *Pod) (*Pod, error)
WatchPods(labels map[string]string) (watch.Watch, error)
}
// PodList ...
type PodList struct {
Items []Pod `json:"items"`
}
// Pod is the top level item for a pod
type Pod struct {
Metadata *Meta `json:"metadata"`
Status *Status `json:"status"`
}
// Meta ...
type Meta struct {
Name string `json:"name,omitempty"`
Labels map[string]*string `json:"labels,omitempty"`
Annotations map[string]*string `json:"annotations,omitempty"`
}
// Status ...
type Status struct {
PodIP string `json:"podIP"`
Phase string `json:"phase"`
}
1
https://gitee.com/liuxuezhan/go-plugins.git
git@gitee.com:liuxuezhan/go-plugins.git
liuxuezhan
go-plugins
go-plugins
db1d4b8b101e

搜索帮助

53164aa7 5694891 3bd8fe86 5694891