Documentation
¶
Index ¶
- type Manager
- func (m *Manager) CleanupOrphanedProcesses() error
- func (m *Manager) DisableService(namespace string, serviceType ServiceType) error
- func (m *Manager) EnableService(namespace string, serviceType ServiceType) error
- func (m *Manager) GenerateEnvFile(namespace, nodeID string, serviceType ServiceType, envVars map[string]string) error
- func (m *Manager) InstallTemplateUnits(sourceDir string) error
- func (m *Manager) IsServiceActive(namespace string, serviceType ServiceType) (bool, error)
- func (m *Manager) ListNamespaceServices() ([]string, error)
- func (m *Manager) ReloadDaemon() error
- func (m *Manager) RestartService(namespace string, serviceType ServiceType) error
- func (m *Manager) StartAllNamespaceServices(namespace string) error
- func (m *Manager) StartService(namespace string, serviceType ServiceType) error
- func (m *Manager) StopAllNamespaceServices(namespace string) error
- func (m *Manager) StopAllNamespaceServicesGlobally() error
- func (m *Manager) StopService(namespace string, serviceType ServiceType) error
- type ServiceType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager manages systemd units for namespace services
func NewManager ¶
NewManager creates a new systemd manager
func (*Manager) CleanupOrphanedProcesses ¶
CleanupOrphanedProcesses finds and kills any orphaned namespace processes not managed by systemd This is for cleaning up after migration from old exec.Command approach
func (*Manager) DisableService ¶
func (m *Manager) DisableService(namespace string, serviceType ServiceType) error
DisableService disables a namespace service
func (*Manager) EnableService ¶
func (m *Manager) EnableService(namespace string, serviceType ServiceType) error
EnableService enables a namespace service to start on boot
func (*Manager) GenerateEnvFile ¶
func (m *Manager) GenerateEnvFile(namespace, nodeID string, serviceType ServiceType, envVars map[string]string) error
GenerateEnvFile creates the environment file for a namespace service
func (*Manager) InstallTemplateUnits ¶
InstallTemplateUnits installs the systemd template unit files
func (*Manager) IsServiceActive ¶
func (m *Manager) IsServiceActive(namespace string, serviceType ServiceType) (bool, error)
IsServiceActive checks if a namespace service is active
func (*Manager) ListNamespaceServices ¶
ListNamespaceServices returns all namespace services currently registered in systemd
func (*Manager) ReloadDaemon ¶
ReloadDaemon reloads systemd daemon configuration
func (*Manager) RestartService ¶
func (m *Manager) RestartService(namespace string, serviceType ServiceType) error
RestartService restarts a namespace service
func (*Manager) StartAllNamespaceServices ¶
StartAllNamespaceServices starts all namespace services for a given namespace
func (*Manager) StartService ¶
func (m *Manager) StartService(namespace string, serviceType ServiceType) error
StartService starts a namespace service
func (*Manager) StopAllNamespaceServices ¶
StopAllNamespaceServices stops all namespace services for a given namespace
func (*Manager) StopAllNamespaceServicesGlobally ¶
StopAllNamespaceServicesGlobally stops ALL namespace services on this node (for upgrade/maintenance)
func (*Manager) StopService ¶
func (m *Manager) StopService(namespace string, serviceType ServiceType) error
StopService stops a namespace service
type ServiceType ¶
type ServiceType string
ServiceType represents the type of namespace service
const ( ServiceTypeRQLite ServiceType = "rqlite" ServiceTypeOlric ServiceType = "olric" ServiceTypeGateway ServiceType = "gateway" )