main.bend relies on unsafe/foreign
raw source on the hub · import 0x67452e7bc6132b3fa11a687623945b86/main.bend as Main
4 imports
import Base import ./host/main.bend as H import ./host/api.bend as A import ./src/vmm/snapdir.bend as Sd
Definitions
def Vmm.status source · line 29 · raw
@+vm:String -> IO(Result<&1, &1, 0x67452e7bc6132b3fa11a687623945b86/host/api.Err, 0x67452e7bc6132b3fa11a687623945b86/host/api.Status>)
Calls on a VM from another process. vm is its folder or its --control socket; each answers a Result whose error (A.Err) tells no socket, not running and timeout apart. Snapshots need a folder (src/vmm/snapdir.bend: DIR/snapshots/NAME). Nothing prints or ends the process.
def Vmm.pause source · line 32 · raw
@+vm:String -> IO(Result<&1, &1, 0x67452e7bc6132b3fa11a687623945b86/host/api.Err, String>)
def Vmm.resume source · line 35 · raw
@+vm:String -> IO(Result<&1, &1, 0x67452e7bc6132b3fa11a687623945b86/host/api.Err, String>)
def Vmm.stop source · line 38 · raw
@+vm:String -> IO(Result<&1, &1, 0x67452e7bc6132b3fa11a687623945b86/host/api.Err, String>)
def Vmm.powerdown source · line 41 · raw
@+vm:String -> IO(Result<&1, &1, 0x67452e7bc6132b3fa11a687623945b86/host/api.Err, String>)
def Vmm.ctl source · line 44 · raw
@+vm:String -> @+line:String -> IO(Result<&1, &1, 0x67452e7bc6132b3fa11a687623945b86/host/api.Err, String>)
def Vmm.create source · line 47 · raw
@+dir:String -> @+flags:List<&2, String> -> IO(Result<&1, &1, 0x67452e7bc6132b3fa11a687623945b86/host/api.Err, String>)
def Vmm.snapshot source · line 50 · raw
@+vm:String -> @+name:String -> @+note:String -> IO(Result<&1, &1, 0x67452e7bc6132b3fa11a687623945b86/host/api.Err, 0x67452e7bc6132b3fa11a687623945b86/src/vmm/snapdir.Info>)
def Vmm.snapshots source · line 53 · raw
@+vm:String -> IO(Result<&1, &1, 0x67452e7bc6132b3fa11a687623945b86/host/api.Err, List<&2, 0x67452e7bc6132b3fa11a687623945b86/src/vmm/snapdir.Info>>)
def Vmm.snapshot_rm source · line 56 · raw
@+vm:String -> @+name:String -> IO(Result<&1, &1, 0x67452e7bc6132b3fa11a687623945b86/host/api.Err, String>)
def Vmm.prune source · line 59 · raw
@+vm:String -> @+keep:U32 -> IO(Result<&1, &1, 0x67452e7bc6132b3fa11a687623945b86/host/api.Err, List<&2, String>>)
Unsafe
unsafe Vmm.run source · line 13 · raw
@+prog:List<&1, String> -> @+flags:List<&1, String> -> IO(Unit)
unsafe Vmm.run_dir source · line 19 · raw
@+prog:List<&1, String> -> @+dir:String -> IO(Unit)
A VM folder (bend-vmm create): runs its VM (vm.conf, its control socket DIR/control.sock), or runs it from one of its snapshots, saving the current state first (bend-vmm restore).
unsafe Vmm.restore source · line 22 · raw
@+prog:List<&1, String> -> @+vm:String -> @+name:String -> IO(Unit)
unsafe main source · line 62 · raw
IO(Unit)