// SyncServices synchronizes all services into zookeeper func SyncServices(conn client.Connection, services []service.Service) error { nodes := make([]zzk.Node, len(services)) for i := range services { nodes[i] = &ServiceNode{Service: &services[i]} } return zzk.Sync(conn, nodes, servicepath()) }
func SyncVirtualIPs(conn client.Connection, virtualIPs []pool.VirtualIP) error { nodes := make([]zzk.Node, len(virtualIPs)) for i := range virtualIPs { nodes[i] = &VirtualIPNode{VirtualIP: &virtualIPs[i]} } return zzk.Sync(conn, nodes, vippath()) }
func SyncResourcePools(conn client.Connection, pools []pool.ResourcePool) error { nodes := make([]zzk.Node, len(pools)) for i := range pools { nodes[i] = &PoolNode{ResourcePool: &pools[i]} } return zzk.Sync(conn, nodes, poolpath()) }