8000 GitHub - niedbalski/gocriu: Go bindings for checkpoint/restore functionality for Linux in userspace. (http://criu.org/)
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

niedbalski/gocriu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Golang CRIU ( http://criu.org )

This package is not official, just an experimental package for interact with the rpc/protobuf criu service.

How to use this library

First you need a running criu server

$ sudo criu service -vvv -W criu -o service.log -b -x --address /tmp/criu.socket -j --shell-job

Then you can write a Go client, as an example:

package main

import (
	gocriu "github.com/niedbalski/gocriu"
	"os"
    "fmt"
	"strconv"
)

func main() {
	criu, _ := gocriu.CriuClient("/tmp/criu.socket", "/tmp/pid_dump", true)

    dumped, err := criu.Dump(pid)

	if err != nil {
		panic(err)
	}

	fmt.Println(dumped)

	restored, err := criu.Restore(pid) // Restore the PID

    if err != nil {
		panic(err)
	}

	fmt.Println(restored)
}

Todo

  • Test
  • Documentation

About

Go bindings for checkpoint/restore functionality for Linux in userspace. (http://criu.org/)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0