package volume
type Mount struct {
Source string `json:"source"`
Path string `json:"path"`
Readonly bool `json:"readonly,omitempty"`
}
type Config struct {
MaxMounts int
Backend string
Virtiofs VirtiofsConfig
}
type VirtiofsConfig struct {
Binary string
RuntimeDir string
}
type Device struct {
SandboxID string `json:"sandbox_id,omitempty"`
Backend string `json:"backend,omitempty"`
Tag string `json:"tag,omitempty"`
Socket string `json:"socket,omitempty"`
VolumeDir string `json:"volume_dir,omitempty"`
ConfigPath string `json:"config_path,omitempty"`
PID int `json:"pid,omitempty"`
StartTime uint64 `json:"start_time,omitempty"`
Exited <-chan struct{} `json:"-"`
}
type PrepareRequest struct {
SandboxID string
Mounts []Mount
}
type Backend interface {
Name() string
Prepare(req PrepareRequest) ([]Device, error)
Cleanup(sandboxID string, devices []Device) error
CleanupStaleResources() error
}