func (self *DataServer) execMigration(command *proc.MasterCommand) { location := proc.ServerLocation(command.DstMachine) for _, blockStr := range command.Blocks { block := &proc.CatBlock{ ID: blockStr, Locations: []proc.ServerLocation{location}, } go self.migrateBlock(block) } }
func Serve(index int) error { server := NewDataServer(proc.ServerLocation(index)) return server.Serve() }