package phaul
import "github.com/checkpoint-restore/go-criu/v5/phaul"
Index ¶
- type Client
- func MakePhaulClient(l Local, r Remote, c Config) (*Client, error)
- func (pc *Client) Migrate() error
- type Config
- type Local
- type Remote
- type Server
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client struct
func MakePhaulClient ¶
MakePhaulClient function Main entry point. Caller should create the client object by passing here local, remote and comm. See comment in corresponding interfaces/structs for explanation.
Then call client.Migrate() and enjoy :)
func (*Client) Migrate ¶
Migrate function
type Config ¶
Config is the configuration which is passed around
Pid is what we migrate Memfd is the file descriptor via which criu can transfer memory pages. Wdir is the directory where phaul can put images and other stuff
type Local ¶
type Local interface { DumpCopyRestore(criu *criu.Criu, c Config, lastClientImagesPath string) error }
Local interface Interface to local classes. Client calls them when it needs something on the source node.
Methods:
- DumpCopyRestore() is called on client side when the pre-iterations are over and it's time to do full dump, copy images and restore them on the server side. All the time this method is executed victim tree is frozen on client. Returning nil kills the tree, error unfreezes it and resumes. The criu argument is the pointer on created criu.Criu object on which client may call Dump(). The requirement on opts passed are: set Ps.Fd to comm.Memfd set ParentImg to lastClientImagesPath set TrackMem to true
type Remote ¶
Remote interface Rpc between PhaulClient and PhaulServer. When client calls anything on this one, the corresponding method should be called on PhaulServer object.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server struct
func MakePhaulServer ¶
MakePhaulServer function Main entry point. Make the server with comm and call PhaulRemote methods on it upon client requests.
func (*Server) GetCriu ¶
func (s *Server) GetCriu() *criu.Criu
GetCriu function
func (*Server) LastImagesDir ¶
LastImagesDir function
func (*Server) StartIter ¶
StartIter phaul.Remote methods
func (*Server) StopIter ¶
StopIter function
Source Files ¶
api.go client.go images.go server.go
- Version
- v5.3.0 (latest)
- Published
- Dec 19, 2021
- Platform
- linux/amd64
- Imports
- 9 packages
- Last checked
- 2 weeks ago –
Tools for package owners.