Changes

Jump to: navigation, search

P.Haul

31 bytes added, 13:44, 6 July 2017
Source
Source is to call <code>phaul.MakePhaulClient</code> routine, it also returns a handler (and go error). Arguments are more complex.
;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
* <code>criu.Criu</code> -- a handler to Criu object from [[go wrappers]] using which client may invoke the dump action
* <code>last_client_images_path</code> string denoting where the last dump-s are. Needed to configure the [[incremental dumps]] for this final step
;Next goes the <code>PhaulRemote</code> interface 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.

Navigation menu