Documentation
¶
Index ¶
- Variables
- func NewBoltConn() (*bolt.DB, error)
- func StartGRPCServer() (*grpc.Server, error)
- type Bundle
- type Client
- func (c *Client) ContainerDump(dir string, containerId string) error
- func (c *Client) ContainerRestore(imgPath string, containerId string) error
- func (c *Client) Dump(dir string, pid int32) error
- func (c *Client) Restore(args *task.RestoreArgs) (*int32, error)
- func (c *Client) RuncDump(root, containerId string, opts *container.CriuOpts) error
- func (c *Client) RuncRestore(imgPath, containerId string, opts *container.RuncOpts) error
- func (c *Client) WriteOnlyFds(openFds []*task.OpenFilesStat, pid int32) []string
- type ClientLogs
- type DB
- func (db *DB) CreateOrUpdateCedanaProcess(id string, state *task.ProcessState) error
- func (db *DB) GetLatestLocalCheckpoints(id string) ([]*string, error)
- func (db *DB) GetPID(id string) (int32, error)
- func (db *DB) GetStateFromID(id string) (*task.ProcessState, error)
- func (db *DB) GetStateFromPID(pid int32) (*task.ProcessState, error)
- func (db *DB) UpdateProcessStateWithID(id string, state *task.ProcessState) error
- func (db *DB) UpdateProcessStateWithPID(pid int32, state *task.ProcessState) error
- type GrpcService
- type Server
- type UploadResponse
Constants ¶
This section is empty.
Variables ¶
var AppFs = afero.NewOsFs()
wrapper over filesystem, useful for mocking in tests
Functions ¶
func NewBoltConn ¶
func StartGRPCServer ¶
Types ¶
type Bundle ¶
The bundle includes path to bundle and the runc/podman container id of the bundle. The bundle is a folder that includes the oci spec config.json as well as the rootfs used for setting up the container. Sometimes rootfs can be defined elsewhere. Podman adds extra directories and files in their bundle including a file called attach which is a unix socket for attaching stdin, stdout to the terminal
type Client ¶
func InstantiateClient ¶
func (*Client) ContainerRestore ¶
func (*Client) RuncRestore ¶
func (*Client) WriteOnlyFds ¶
func (c *Client) WriteOnlyFds(openFds []*task.OpenFilesStat, pid int32) []string
WriteOnlyFds takes a snapshot of files that are open (in writeonly) by process PID and outputs full paths. For concurrent processes (multithreaded) this can be dangerous and lead to weird race conditions (maybe). To avoid actually using ptrace (TODO NR) we loop through the openFds of the process and check the flags.
type ClientLogs ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
func (*DB) CreateOrUpdateCedanaProcess ¶
func (db *DB) CreateOrUpdateCedanaProcess(id string, state *task.ProcessState) error
KISS for now - but we may want to separate out into subbuckets as we add more checkpointing functionality (like incremental checkpointing or GPU checkpointing) structure is default -> xid, xid -> pid: state (arrows denote buckets)
func (*DB) GetLatestLocalCheckpoints ¶
func (*DB) GetStateFromID ¶
func (db *DB) GetStateFromID(id string) (*task.ProcessState, error)
This automatically gets the latest entry in the job bucket
func (*DB) GetStateFromPID ¶
func (db *DB) GetStateFromPID(pid int32) (*task.ProcessState, error)
func (*DB) UpdateProcessStateWithID ¶
func (db *DB) UpdateProcessStateWithID(id string, state *task.ProcessState) error
func (*DB) UpdateProcessStateWithPID ¶
func (db *DB) UpdateProcessStateWithPID(pid int32, state *task.ProcessState) error