Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DetectStandaloneHost ¶
DetectStandaloneHost returns the local standalone systemd unit contents when running on a standalone host. Missing standalone markers are reported as found=false without an error.
func IsServiceActive ¶
IsServiceActive reports whether the standalone vCluster systemd unit is currently active on this host, along with the unit's observed state (the systemctl is-active output) so callers can name it in an error. It treats activating, deactivating, and refreshing as active as well — in all of them a server process may still hold the backing store open — so callers can use it as a guard that refuses to run while a control plane is up. It reports false where systemd cannot answer (non-Linux, no systemctl binary, systemd unreachable, unit stopped/failed/not installed), so the in-pod restore path, which has no systemd, proceeds.
func ParseEnvFromSystemdUnit ¶
ParseEnvFromSystemdUnit extracts the value of an Environment="KEY=value" directive from a systemd unit file. Returns empty string if not found.
Types ¶
type RuntimeMetadata ¶
type RuntimeMetadata struct {
Version string `json:"version,omitempty"`
IPAddress string `json:"ip,omitempty"`
NodeClaim string `json:"nodeClaim,omitempty"`
StartTime string `json:"startTime,omitempty"`
}
func LoadRuntimeMetadata ¶
func LoadRuntimeMetadata(dataDir string) (*RuntimeMetadata, error)
type ServiceManager ¶
ServiceManager abstracts stopping and starting the standalone vCluster process.
func NewServiceManager ¶
func NewServiceManager() (ServiceManager, error)
NewServiceManager returns a systemd-based service manager when on Linux with systemd available. Returns an error on other platforms or when the service unit is not found.
type SystemdServiceManager ¶
type SystemdServiceManager struct {
// contains filtered or unexported fields
}
func (*SystemdServiceManager) Start ¶
func (s *SystemdServiceManager) Start() error
func (*SystemdServiceManager) Stop ¶
func (s *SystemdServiceManager) Stop() error