Documentation
¶
Index ¶
- type Config
- type Server
- type TopoUpdate
- type Topology
- func (top *Topology) Close(proxyName string)
- func (top *Topology) CreateProxyFenceNode(pi *models.ProxyInfo) (string, error)
- func (top *Topology) CreateProxyInfo(pi *models.ProxyInfo) (string, error)
- func (top *Topology) DoResponse(seq int, pi *models.ProxyInfo) error
- func (top *Topology) Exist(path string) (bool, error)
- func (top *Topology) GetActionResponsePath(seq int) string
- func (top *Topology) GetActionSeqList(productName string) ([]int, error)
- func (top *Topology) GetActionWithSeq(seq int64) (*models.Action, error)
- func (top *Topology) GetActionWithSeqObject(seq int64, act *models.Action) error
- func (top *Topology) GetGroup(groupId int) (*models.ServerGroup, error)
- func (top *Topology) GetProxyInfo(proxyName string) (*models.ProxyInfo, error)
- func (top *Topology) GetSlotByIndex(i int) (*models.Slot, *models.ServerGroup, error)
- func (top *Topology) InitZkConn()
- func (top *Topology) IsChildrenChangedEvent(e interface{}) bool
- func (top *Topology) SetProxyStatus(proxyName string, status string) error
- func (top *Topology) WatchChildren(path string, evtbus chan interface{}) ([]string, error)
- func (top *Topology) WatchNode(path string, evtbus chan interface{}) ([]byte, error)
- type ZkFactory
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
proxy-server
func (*Server) SetMyselfOnline ¶
通过调用dashboard将自己的状态设置为online
type TopoUpdate ¶
type Topology ¶
type Topology struct {
ProductName string // 集群项目名称
// contains filtered or unexported fields
}
集群拓扑信息管理对象,封装了一些获取集群信息的操作
func NewTopo ¶
func NewTopo(ProductName string, zkAddr string, f ZkFactory, provider string, zkSessionTimeout int) *Topology
创建集群拓扑管理对象
func (*Topology) CreateProxyFenceNode ¶
在fence节点下创建proxy信息
func (*Topology) CreateProxyInfo ¶
在zk上创建proxy信息
func (*Topology) DoResponse ¶
回复通知,就是在 ActionResponse 的 seq 节点下创建以自己 proxy_id 命名的节点
func (*Topology) GetActionResponsePath ¶
根据 action 里的序号,返回 ActionResponse 里的路径
func (*Topology) GetActionSeqList ¶
func (*Topology) GetActionWithSeq ¶
根据序号获取通知信息
func (*Topology) GetActionWithSeqObject ¶
根据序号获取解析后的action对象
func (*Topology) GetProxyInfo ¶
获取指定id的proxy的信息
func (*Topology) GetSlotByIndex ¶
获取指定id的slot信息,并且获取所在group的信息
func (*Topology) IsChildrenChangedEvent ¶
func (*Topology) SetProxyStatus ¶
func (*Topology) WatchChildren ¶
监听目录
Click to show internal directories.
Click to hide internal directories.