Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CedanaState ¶
type CedanaState struct {
ClientInfo ClientInfo `json:"client_info" mapstructure:"client_info"`
ProcessInfo ProcessInfo `json:"process_info" mapstructure:"process_info"`
CheckpointType CheckpointType `json:"checkpoint_type" mapstructure:"checkpoint_type"`
// either local or remote checkpoint path (url vs filesystem path)
CheckpointPath string `json:"checkpoint_path" mapstructure:"checkpoint_path"`
// process state at time of checkpoint
CheckpointState CheckpointState `json:"checkpoint_state" mapstructure:"checkpoint_state"`
}
CedanaState encapsulates a CRIU checkpoint and includes filesystem state for a full restore. Typically serialized and shot around over the wire.
func (*CedanaState) SerializeToFolder ¶
func (cs *CedanaState) SerializeToFolder(dir string) error
type CheckpointState ¶
type CheckpointState string
const ( CheckpointSuccess CheckpointState = "CHECKPOINTED" CheckpointFailed CheckpointState = "CHECKPOINT_FAILED" RestoreSuccess CheckpointState = "RESTORED" RestoreFailed CheckpointState = "RESTORE_FAILED" )
type CheckpointType ¶
type CheckpointType string
const ( CheckpointTypeNone CheckpointType = "none" CheckpointTypeCRIU CheckpointType = "criu" CheckpointTypePytorch CheckpointType = "pytorch" )
type ClientInfo ¶
type ClientInfo struct {
Id string `json:"id" mapstructure:"id"`
Hostname string `json:"hostname" mapstructure:"hostname"`
Platform string `json:"platform" mapstructure:"platform"`
OS string `json:"os" mapstructure:"os"`
Uptime uint64 `json:"uptime" mapstructure:"uptime"`
RemainingMemory uint64 `json:"remaining_memory" mapstructure:"remaining_memory"`
}
type ProcessInfo ¶
type ProcessInfo struct {
PID int32 `json:"pid" mapstructure:"pid"`
AttachedToHardwareAccel bool `json:"attached_to_hardware_accel" mapstructure:"attached_to_hardware_accel"`
OpenFds []process.OpenFilesStat `json:"open_fds" mapstructure:"open_fds"` // list of open FDs
OpenWriteOnlyFilePaths []string `json:"open_write_only" mapstructure:"open_write_only"`
OpenConnections []net.ConnectionStat `json:"open_connections" mapstructure:"open_connections"` // open network connections
MemoryPercent float32 `json:"memory_percent" mapstructure:"memory_percent"` // % of total RAM used
IsRunning bool `json:"is_running" mapstructure:"is_running"`
Status string `json:"status" mapstructure:"status"`
}
type ServerCommand ¶
type ServerCommand struct {
Command string `json:"command" mapstructure:"command"`
Heartbeat bool `json:"heartbeat" mapstructure:"heartbeat"`
CedanaState CedanaState `json:"cedana_state" mapstructure:"cedana_state"`
}
Click to show internal directories.
Click to hide internal directories.