Documentation
¶
Index ¶
- type KVMClient
- func (c *KVMClient) CleanupSpaceArtifacts(space *model.Space) error
- func (c *KVMClient) CreateSpaceJob(user *model.User, template *model.Template, space *model.Space, ...) error
- func (c *KVMClient) CreateSpaceVolumes(user *model.User, template *model.Template, space *model.Space, ...) error
- func (c *KVMClient) CreateVolume(vol *model.Volume, variables map[string]interface{}) error
- func (c *KVMClient) DeleteSpaceJob(space *model.Space, onStopped func()) error
- func (c *KVMClient) DeleteSpaceVolumes(space *model.Space) error
- func (c *KVMClient) DeleteVolume(vol *model.Volume, variables map[string]interface{}) error
- func (c *KVMClient) DomainState(ctx context.Context, name string) (string, error)
- func (c *KVMClient) ListRunningSpaceRuntimeRefs() (map[string]bool, error)
- func (c *KVMClient) StopSpaceRuntime(space *model.Space) error
- func (c *KVMClient) VNCAddress(ctx context.Context, domain string) (string, int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KVMClient ¶
type KVMClient struct {
// contains filtered or unexported fields
}
func (*KVMClient) CleanupSpaceArtifacts ¶
func (*KVMClient) CreateSpaceJob ¶
func (*KVMClient) CreateSpaceVolumes ¶
func (*KVMClient) CreateVolume ¶
func (*KVMClient) DeleteSpaceJob ¶
func (*KVMClient) DeleteSpaceVolumes ¶
DeleteSpaceVolumes destroys the space's VM entirely — undefine the domain and remove its disk, seed and cloud-init files. This runs when a space is deleted; a stop keeps everything (see shutdownDomain).
func (*KVMClient) DeleteVolume ¶
func (*KVMClient) DomainState ¶
DomainState returns the domain's state string (e.g. "running", "shut off"), or "" when the domain does not exist on this host's libvirt.
func (*KVMClient) ListRunningSpaceRuntimeRefs ¶
func (*KVMClient) StopSpaceRuntime ¶
StopSpaceRuntime stops an orphaned running VM without destroying it: the space still exists, so the domain and its disk must survive.
func (*KVMClient) VNCAddress ¶
VNCAddress returns the host and TCP port of the domain's VNC display — the framebuffer QEMU itself renders, served on the node's loopback. domdisplay reports the VNC display number (e.g. "vnc://127.0.0.1:0"), which maps to TCP port 5900+N.