criu/lib
Pavel Emelyanov 3f994bcfc3 lib: Add simple Go wrappers for swrk mode
We'll need some docs :) bu the API is

criu := MakeCriu()

criu.Dump(opts, notify)
criu.Restore(opts, notify)
criu.PreDump(opts, notify)
criu.StartPageServer(opts)

where opts is the object from rpc.proto, Go has almost native support
for those, so caller should

- compile .proto file
- export it and golang/protobuf/proto
- create and initialize the CriuOpts struct

and notify is an interface with callbacks that correspond to criu
notification messages.

A stupid dump/restore tool in src/test/main.go demonstrates the above.

Changes since v1:

* Added keep_open mode for pre-dumps. Do use it one needs
  to call criu.Prepare() right after creation and criu.Cleanup()
  right after .Dump()

* Report resp.cr_errmsg string on request error.

Further TODO:

- docs
- code comments

travis-ci: success for libphaul (rev2)
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-10-27 10:49:46 +03:00
..
c lib/c: add missing criu_local_set_service_binary signature 2018-07-09 18:26:50 +03:00
go lib: Add simple Go wrappers for swrk mode 2018-10-27 10:49:46 +03:00
py crit: Show cpuinfo image 2018-07-09 18:26:49 +03:00
Makefile Makefiles: auto-detect python version - prefer python2 2018-07-09 18:25:16 +03:00