types

package
v0.6.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 29, 2023 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CheckpointTypeNone    CheckpointType = "none"
	CheckpointTypeCRIU    CheckpointType = "criu"
	CheckpointTypePytorch CheckpointType = "pytorch"

	CheckpointSuccess CheckpointState = "CHECKPOINTED"
	CheckpointFailed  CheckpointState = "CHECKPOINT_FAILED"
	RestoreSuccess    CheckpointState = "RESTORED"
	RestoreFailed     CheckpointState = "RESTORE_FAILED"

	// Job here refers to a process or container started and managed (C/R) by the daemon.
	JobStartupFailed Flag = "JOB_STARTUP_FAILED"
	JobKilled        Flag = "JOB_KILLED"
	JobIdle          Flag = "JOB_IDLE"
	JobRunning       Flag = "JOB_RUNNING"
	JobPending       Flag = "JOB_PENDING"
	// setup is used by the orchestrator
	JobSetupFailed Flag = "JOB_SETUP_FAILED"
	JobDone        Flag = "JOB_DONE"
)

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"`

	CheckpointState CheckpointState `json:"checkpoint_state" mapstructure:"checkpoint_state"`
	Flag            Flag            `json:"flag" mapstructure:"flag"`
}

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

type CheckpointType

type CheckpointType string

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 Flag added in v0.6.9

type Flag string

Flag and FlagReason are used together when pushing up state. These should only encapsulate flags that an external service (like an orchestrator) can use for deciding what to do - especially in the case that the daemon reaches a point after which further actions are not possible (or shouldn't be possible). Ideally, Flag should also never be empty.

type FlagReason added in v0.6.9

type FlagReason string

type GPUInfo

type GPUInfo struct {
	Count            int       `json:"count" mapstructure:"count"`
	UtilizationRates []float64 `json:"utilization_rates" mapstructure:"utilization_rates"`
	PowerUsage       uint64    `json:"power_usage" mapstructure:"power_usage"`
}

type Job added in v0.6.9

type Job struct {
	Command string `json:"command"`
}

type Logs

type Logs struct {
	Stdout string `mapstructure:"stdout"`
	Stderr string `mapstructure:"stderr"`
}

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"`
	// orchestrator passes back the latest cedanaState to the client which can be used to verify
	// the source prior to execution.
	// TODO NR - implement verification
	CedanaState CedanaState `json:"cedana_state" mapstructure:"cedana_state"`

	// new job command to be executed
	UpdatedTask string `json:"updated_task" mapstructure:"updated_task"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL