Example #1
0
//
// 删除Service Endpoint
//
func (s *ServiceEndpoint) DeleteServiceEndpoint(top *Topology) {
	path := top.ProductServiceEndPointPath(s.Service, s.ServiceId)
	if ok, _ := top.Exist(path); ok {
		zkhelper.DeleteRecursive(top.ZkConn, path, -1)
		log.Println(Red("DeleteServiceEndpoint"), "Path: ", path)
	}
}
Example #2
0
func (top *Topology) DeleteDir(path string) {
	dir := top.FullPath(path)
	if ok, _ := top.Exist(dir); ok {
		zkhelper.DeleteRecursive(top.ZkConn, dir, -1)
	}
}