Documentation ¶
Index ¶
- func StartRequiresSystemd(conf *option.Conf) error
- type Controller
- type ControllerSystemd
- func (m *ControllerSystemd) CheckBeforeStart() bool
- func (m *ControllerSystemd) DisableService(name string) error
- func (m *ControllerSystemd) EnableService(name string) error
- func (m *ControllerSystemd) RemoveConfig(name string) error
- func (m *ControllerSystemd) RestartService(serviceName string) error
- func (m *ControllerSystemd) StartList(list []*service.Service) error
- func (m *ControllerSystemd) StartService(serviceName string) error
- func (m *ControllerSystemd) StopList(list []*service.Service) error
- func (m *ControllerSystemd) StopService(serviceName string) error
- func (m *ControllerSystemd) WriteConfig(s *service.Service) error
- type Manager
- type ManagerService
- func (m *ManagerService) GetAllService() ([]*service.Service, error)
- func (m *ManagerService) Offline() error
- func (m *ManagerService) Online() error
- func (m *ManagerService) ReLoadServices() error
- func (m *ManagerService) RemoveServices() error
- func (m *ManagerService) Start() error
- func (m *ManagerService) StartSyncService()
- func (m *ManagerService) Stop() error
- func (m *ManagerService) StopSyncService()
- func (m *ManagerService) WaitStart(name string, duration time.Duration) bool
- func (m *ManagerService) WriteServices() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StartRequiresSystemd ¶
Types ¶
type Controller ¶
type Controller interface { StartService(name string) error StopService(name string) error StartList(list []*service.Service) error StopList(list []*service.Service) error RestartService(serviceName string) error WriteConfig(s *service.Service) error RemoveConfig(name string) error EnableService(name string) error DisableService(name string) error CheckBeforeStart() bool }
type ControllerSystemd ¶
type ControllerSystemd struct { SysConfigDir string NodeType string StartType string ServiceCli string // contains filtered or unexported fields }
func NewControllerSystemd ¶
func NewControllerSystemd(conf *option.Conf, cluster client.ClusterClient) *ControllerSystemd
At the stage you want to load the configurations of all rainbond components
func (*ControllerSystemd) CheckBeforeStart ¶
func (m *ControllerSystemd) CheckBeforeStart() bool
func (*ControllerSystemd) DisableService ¶
func (m *ControllerSystemd) DisableService(name string) error
func (*ControllerSystemd) EnableService ¶
func (m *ControllerSystemd) EnableService(name string) error
func (*ControllerSystemd) RemoveConfig ¶
func (m *ControllerSystemd) RemoveConfig(name string) error
func (*ControllerSystemd) RestartService ¶
func (m *ControllerSystemd) RestartService(serviceName string) error
func (*ControllerSystemd) StartList ¶
func (m *ControllerSystemd) StartList(list []*service.Service) error
func (*ControllerSystemd) StartService ¶
func (m *ControllerSystemd) StartService(serviceName string) error
func (*ControllerSystemd) StopList ¶
func (m *ControllerSystemd) StopList(list []*service.Service) error
func (*ControllerSystemd) StopService ¶
func (m *ControllerSystemd) StopService(serviceName string) error
func (*ControllerSystemd) WriteConfig ¶
func (m *ControllerSystemd) WriteConfig(s *service.Service) error
type Manager ¶
type Manager interface { Start() error Stop() error GetAllService() ([]*service.Service, error) Online() error Offline() error ReLoadServices() error }
Manager Manager
type ManagerService ¶
type ManagerService struct {
// contains filtered or unexported fields
}
func NewManagerService ¶
func NewManagerService(conf *option.Conf, healthyManager healthy.Manager) (*ManagerService, *clientv3.Client, client.ClusterClient)
func (*ManagerService) GetAllService ¶
func (m *ManagerService) GetAllService() ([]*service.Service, error)
func (*ManagerService) Offline ¶
func (m *ManagerService) Offline() error
stop all service of on the node
func (*ManagerService) Online ¶
func (m *ManagerService) Online() error
start all service of on the node
func (*ManagerService) ReLoadServices ¶
func (m *ManagerService) ReLoadServices() error
1. reload services info from local file system 2. regenerate systemd config file and restart with config changes 3. start all newly added services
func (*ManagerService) RemoveServices ¶
func (m *ManagerService) RemoveServices() error
func (*ManagerService) StartSyncService ¶
func (m *ManagerService) StartSyncService()
synchronize all service status to as we expect
func (*ManagerService) StopSyncService ¶
func (m *ManagerService) StopSyncService()
func (*ManagerService) WaitStart ¶
func (m *ManagerService) WaitStart(name string, duration time.Duration) bool
func (*ManagerService) WriteServices ¶
func (m *ManagerService) WriteServices() error
Click to show internal directories.
Click to hide internal directories.