That is, now I want to add another player called Agent to transmit RPC from leader to follower, in order to unload the leader. And I simulate an environment to add the distance as a factor to influence to elect the Agent.
But now I have a problem! I want to add the x,y(using a vector to store these two factor) into a new function AgentElection, and I do not know how to add it to the request. Because I got the 3 different clusters before that, for example: cluster[0] contains 3 peers cluster[0][0],cluster[0][1],cluster[0][2],and everyone contains X and Y, means cluster[0][0].X, cluster[0][0].Y, but I do not know how to set it to request, I try to put a message called Tuple{ required x; required y},and in message AgentElection using required Tuple cluster[0],but it is wrong!!
I do not know, under this condition, how to add the x y to the request, Could someone give me some advice?