当前仓库属于暂停状态,部分功能使用受限,详情请查阅 仓库状态说明
2 Star 0 Fork 1

JUMEI_ARCH / go-plugins
暂停

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
kubernetes.go 803 Bytes
一键复制 编辑 原始数据 按行查看 历史
package client
import "github.com/micro/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"`
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/JMArch/go-plugins.git
git@gitee.com:JMArch/go-plugins.git
JMArch
go-plugins
go-plugins
v0.2.0

搜索帮助

344bd9b3 5694891 D2dac590 5694891