Documentation
¶
Overview ¶
Package vnc provides headless remote display serving for virtual machines.
It is intended to wrap the private VZVNCServer APIs and their security configurations behind a small Go surface for attaching a virtual machine or graphics display to a TCP listener or Bonjour-published VNC service.
The package should focus on a small set of concepts:
Config for port, vm.Queue, and security settings Server for lifecycle management Helpers to attach a VM or specific display
This package relies on private Virtualization.framework APIs and should be kept separate from the public VM construction helpers in the parent package.
Index ¶
- type Config
- type SecurityConfig
- type SecurityMode
- type Server
- func (s *Server) DebugDescription() string
- func (s *Server) Description() string
- func (s *Server) Port() uint16
- func (s *Server) Raw() pvz.VZVNCServer
- func (s *Server) SecurityConfiguration() SecurityConfig
- func (s *Server) SetGraphicsDisplay(display pvz.IVZGraphicsDisplay)
- func (s *Server) SetVirtualMachine(vm pvz.IVZVirtualMachine)
- func (s *Server) Start()
- func (s *Server) State() int64
- func (s *Server) Stop()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Port uint16
ServiceName string
Queue *vm.Queue
Mode SecurityMode
Password string
}
Config controls VNC server creation.
type SecurityConfig ¶
type SecurityConfig struct {
// contains filtered or unexported fields
}
SecurityConfig wraps a private VNC security configuration.
func NewNoSecurityConfig ¶
func NewNoSecurityConfig() SecurityConfig
NewNoSecurityConfig creates a configuration that allows unauthenticated access.
func NewPasswordSecurityConfig ¶
func NewPasswordSecurityConfig(password string) (SecurityConfig, error)
NewPasswordSecurityConfig creates a password-protected VNC security configuration.
func NewSecurityConfig ¶
func NewSecurityConfig(cfg Config) (SecurityConfig, error)
NewSecurityConfig builds a security configuration from Config.
func (SecurityConfig) Object ¶
func (c SecurityConfig) Object() objectivec.IObject
Object returns the Objective-C object for the security configuration.
type SecurityMode ¶
type SecurityMode string
SecurityMode selects the security configuration for the VNC server.
const ( // SecurityNone disables authentication. SecurityNone SecurityMode = "none" // SecurityPassword enables password authentication. SecurityPassword SecurityMode = "password" )
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server wraps a private VNC server.
func (*Server) DebugDescription ¶
DebugDescription returns the Objective-C debug description string.
func (*Server) Description ¶
Description returns the Objective-C description string.
func (*Server) Raw ¶
func (s *Server) Raw() pvz.VZVNCServer
Raw returns the underlying private VNC server.
func (*Server) SecurityConfiguration ¶
func (s *Server) SecurityConfiguration() SecurityConfig
SecurityConfiguration returns the private security configuration.
func (*Server) SetGraphicsDisplay ¶
func (s *Server) SetGraphicsDisplay(display pvz.IVZGraphicsDisplay)
SetGraphicsDisplay attaches a graphics display to the server.
func (*Server) SetVirtualMachine ¶
func (s *Server) SetVirtualMachine(vm pvz.IVZVirtualMachine)
SetVirtualMachine attaches a VM to the server.