Documentation
¶
Index ¶
- Constants
- func NewServer(cfg Config, vm *VMManager, state *RuntimeState) (*http.Server, error)
- func Run(ctx context.Context, cfg Config) error
- type BootConfig
- type BootEnabled
- type BootTarget
- type Commander
- type Config
- type GuestConfig
- type NetworkManager
- type OSCommander
- type PowerState
- type Process
- type QEMUConfig
- type RedfishConfig
- type RedfishHandler
- type ResetType
- type RuntimeState
- type VMManager
- type VXLANConfig
- type WireGuardConfig
Constants ¶
View Source
const ( ArchitectureAMD64 = meta.ArchitectureAMD64 ArchitectureARM64 = meta.ArchitectureARM64 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BootConfig ¶
type BootConfig struct {
Target BootTarget
Enabled BootEnabled
}
type BootEnabled ¶
type BootEnabled string
const ( BootContinuous BootEnabled = "Continuous" BootDisabled BootEnabled = "Disabled" )
type BootTarget ¶
type BootTarget string
const ( BootTargetPxe BootTarget = "Pxe" BootTargetHdd BootTarget = "Hdd" )
type Config ¶
type Config struct {
ListenAddr string
PublicRedfishURL string
DataDir string
PodName string
PodNamespace string
Architecture string
KubernetesClient client.Client
ConfigureNetwork bool
WireGuard WireGuardConfig
VXLAN VXLANConfig
BridgeName string
TapName string
Guest GuestConfig
Redfish RedfishConfig
QEMU QEMUConfig
}
Config contains all settings for one standalone playpen runner pod.
func DefaultConfig ¶
func DefaultConfig() Config
func (*Config) ApplyArchitectureDefaults ¶
type GuestConfig ¶
type NetworkManager ¶
type NetworkManager struct {
// contains filtered or unexported fields
}
func NewNetworkManager ¶
func NewNetworkManager(cmd Commander, cfg Config) *NetworkManager
func (*NetworkManager) ConfigurePeer ¶
func (m *NetworkManager) ConfigurePeer(ctx context.Context, clientPublicKey string) error
type PowerState ¶
type PowerState string
const ( PowerOn PowerState = "On" PowerOff PowerState = "Off" )
type QEMUConfig ¶
type RedfishConfig ¶
type RedfishHandler ¶
type RedfishHandler struct {
// contains filtered or unexported fields
}
func NewRedfishHandler ¶
func NewRedfishHandler(vm *VMManager, cfg RedfishConfig, dataDir string) *RedfishHandler
func (*RedfishHandler) ServeHTTP ¶
func (h *RedfishHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type RuntimeState ¶
type RuntimeState struct {
// contains filtered or unexported fields
}
func NewRuntimeState ¶
func NewRuntimeState(serverWireGuardPublicKey string, ready bool) *RuntimeState
func (*RuntimeState) Ready ¶
func (s *RuntimeState) Ready() bool
func (*RuntimeState) ServerWireGuardPublicKey ¶
func (s *RuntimeState) ServerWireGuardPublicKey() string
func (*RuntimeState) SetReady ¶
func (s *RuntimeState) SetReady()
type VMManager ¶
type VMManager struct {
// contains filtered or unexported fields
}
func NewVMManager ¶
func (*VMManager) BootConfig ¶
func (m *VMManager) BootConfig() BootConfig
func (*VMManager) PowerState ¶
func (m *VMManager) PowerState() PowerState
func (*VMManager) SetBootConfig ¶
func (m *VMManager) SetBootConfig(config BootConfig)
type VXLANConfig ¶
Click to show internal directories.
Click to hide internal directories.