• Pavel Emelyanov's avatar
    lib: Add simple Go wrappers for swrk mode · 3f994bcf
    Pavel Emelyanov authored
    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: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
    Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
    3f994bcf
Name
Last commit
Last update
Documentation Loading commit data...
compel Loading commit data...
contrib Loading commit data...
coredump Loading commit data...
crit Loading commit data...
criu Loading commit data...
images Loading commit data...
include/common Loading commit data...
lib Loading commit data...
scripts Loading commit data...
soccr Loading commit data...
test Loading commit data...
.gitignore Loading commit data...
.mailmap Loading commit data...
.travis.yml Loading commit data...
COPYING Loading commit data...
CREDITS Loading commit data...
INSTALL.md Loading commit data...
Makefile Loading commit data...
Makefile.compel Loading commit data...
Makefile.config Loading commit data...
Makefile.install Loading commit data...
Makefile.versions Loading commit data...
README.md Loading commit data...