Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArchiveFragment ¶
type BuilderConfig ¶
type BuiltinFragment ¶
type FileContentsFragment ¶
type Fragment ¶
type Fragment struct { // Not supported by TinyRange directly. RunCommand *RunCommandFragment `json:"run_command" yaml:"run_command"` LocalFile *LocalFileFragment `json:"local_file" yaml:"local_file"` FileContents *FileContentsFragment `json:"file_contents" yaml:"file_contents"` Archive *ArchiveFragment `json:"archive" yaml:"archive"` Builtin *BuiltinFragment `json:"builtin" yaml:"builtin"` }
type LocalFileFragment ¶
type RunCommandFragment ¶
type RunCommandFragment struct {
Command string `json:"command" yaml:"command"`
}
type TinyRangeConfig ¶
type TinyRangeConfig struct { // The base directory all other filenames resolve from. BaseDirectory string `json:"base_directory" yaml:"base_directory"` // The filename of the hypervisor starlark script to use. HypervisorScript string `json:"hypervisor_script" yaml:"hypervisor_script"` // The kernel to boot. KernelFilename string `json:"kernel_filename" yaml:"kernel_filename"` // A initramfs to pass to the kernel or "" to disable passing a initramfs. InitFilesystemFilename string `json:"init_filesystem_filename" yaml:"init_filesystem_filename"` // A list of RootFsFragments. RootFsFragments []Fragment `json:"rootfs_fragments" yaml:"rootfs_fragments"` // The size of the rootfs in megabytes. StorageSize int `json:"storage_size" yaml:"storage_size"` // The way the user will interact with the virtual machine (options: [ssh, serial], default: ssh). Interaction string `json:"interaction" yaml:"interaction"` // The number of CPU cores to allocate to the virtual machine. CPUCores int `json:"cpu_cores" yaml:"cpu_cores"` // The amount of memory to allocate to the virtual machine. MemoryMB int `json:"memory_mb" yaml:"memory_mb"` // Config parameters to pass to the hypervisor. HypervisorConfig map[string]string `json:"hypervisor_config" yaml:"hypervisor_config"` }
A config file that can be passed to TinyRange to configure and execute a virtual machine.
func (TinyRangeConfig) Resolve ¶
func (cfg TinyRangeConfig) Resolve(filename string) string
Click to show internal directories.
Click to hide internal directories.