Documentation
¶
Index ¶
Constants ¶
View Source
const ( // ErrImageNotFound means the requested docker image is not found locally ErrImageNotFound = 101 // ErrNetworkNotFound means the requested docker network is not found locally ErrNetworkNotFound = 102 // ErrContainerNotFound means the requested docker container is not found locally ErrContainerNotFound = 103 )
Variables ¶
View Source
var ErrSandboxNotFound = errors.New("sandbox not found")
Functions ¶
This section is empty.
Types ¶
type CPUInfo ¶
type CPUInfo struct {
Model string `json:"model"`
Cores int `json:"cores"`
Frequency float64 `json:"frequency"`
Cache int32 `json:"cache"`
}
CPUInfo holds information about the characteristics of the CPU
type HardwareStats ¶
type HardwareStats struct {
Memory MemoryInfo `json:"memory"`
CPU CPUStats `json:"cpu"`
Storage StorageStats `json:"storage"`
}
HardwareStats holds information about the state and usage of the system
type MemoryInfo ¶
type MemoryInfo struct {
Total int `json:"total"`
Usage int `json:"usage"`
Cached int `json:"cached"`
Available int `json:"available"`
}
MemoryInfo holds information bout memory usage
type PlatformImage ¶
type RuntimePlatform ¶
type RuntimePlatform interface {
Init() error
GetSandbox(id string) (RuntimeSandbox, error)
GetAllSandboxes() (map[string]RuntimeSandbox, error)
GetImage(id string) (PlatformImage, error)
ImageExistsLocally(id string) (bool, error)
GetAllImages() (map[string]PlatformImage, error)
PullImage(imageRef string) error
RemoveImage(id string) error
NewSandbox(name string, appID string, imageID string, persistence bool) (RuntimeSandbox, error)
GetHWStats() (HardwareStats, error)
}
RuntimePlatform represents the platform that manages the RuntimeSandboxs. For now Docker.
type RuntimeSandbox ¶
type RuntimeSandbox interface {
Start(ip net.IP) error
Stop() error
Update() error
Remove() error
GetID() string
GetStatus() string
GetLogs() ([]byte, error)
GetExitCode() int
}
RuntimeSandbox represents the abstract concept of a running program: it can be a container, VM or process.
Click to show internal directories.
Click to hide internal directories.