Changes

31 bytes added ,  13:44, 6 July 2017
Line 21: Line 21:  
Source is to call <code>phaul.MakePhaulClient</code> routine, it also returns a handler (and go error). Arguments are more complex.
 
Source is to call <code>phaul.MakePhaulClient</code> routine, it also returns a handler (and go error). Arguments are more complex.
   −
;<code>PhaulLocal</code> interface
+
The first is <code>PhaulLocal</code> interface. This one has the single method called <code>DumpCopyRestore</code>. Once p.haul client and server agree, that all preparations (pre-dumps) are done and it's time to call full dump, copy images and call full restore, this method is called. It's up to go-phaul caller to implement this method, as dumping processes is very engine-specific. E.g. OpenVZ, Docker, LXC all have [[CLI|different ways]] of invoking the <code>criu dump</code> operation. In turn, the method accepts
 
  −
This one has the single method called <code>DumpCopyRestore</code>. Once p.haul client and server agree, that all preparations (pre-dumps) are done and it's time to call full dump, copy images and call full restore, this method is called. It's up to go-phaul caller to implement this method, as dumping processes is very engine-specific. E.g. OpenVZ, Docker, LXC all have [[CLI|different ways]] of invoking the <code>criu dump</code> operation. In turn, the method accepts
      
* <code>criu.Criu</code> -- a handler to Criu object from [[go wrappers]] using which client may invoke the dump action
 
* <code>criu.Criu</code> -- a handler to Criu object from [[go wrappers]] using which client may invoke the dump action
Line 29: Line 27:  
* <code>last_client_images_path</code> string denoting where the last dump-s are. Needed to configure the [[incremental dumps]] for this final step
 
* <code>last_client_images_path</code> string denoting where the last dump-s are. Needed to configure the [[incremental dumps]] for this final step
   −
;<code>PhaulRemote</code> interface
+
Next goes the <code>PhaulRemote</code> interface with a set of methods, that client wants to be called on the server object. It's up to the caller to provide the RPC method for this. E.g. in phaul test the server handler is passed as is as this argument.
 
  −
This is an interface with a set of methods, that client wants to be called on the server object. It's up to the caller to provide the RPC method for this. E.g. in phaul test the server handler is passed as is as this argument.
  −
 
  −
;<code>PhaulConfig</code>
      +
The last one is known <code>PhaulConfig</code> object.
    
After these preparations, the <code>client.Migrate()</code> is to be called.
 
After these preparations, the <code>client.Migrate()</code> is to be called.