ETCD后台服务
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

32 lines
731 B

package model
// 这里保存sdk使用到的所有结构图
// Node 一个key 目录或文件
type Node struct {
IsDir bool `json:"is_dir"`
Path string `json:"path"`
Name string `json:"name"`
Value string `json:"value"`
Version int64 `json:"version"`
}
const (
ROLE_LEADER = "leader"
ROLE_FOLLOWER = "follower"
STATUS_HEALTHY = "healthy"
STATUS_UNHEALTHY = "unhealthy"
)
// Member 节点信息
type Member struct {
// *etcdserverpb.Member
ID string `json:"ID"`
Name string `json:"name"`
PeerURLs []string `json:"peerURLs"`
ClientURLs []string `json:"clientURLs"`
Role string `json:"role"`
Status string `json:"status"`
DbSize int64 `json:"db_size"`
}