controller

package
v3.7.0-release+incompa... Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 14, 2018 License: LGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StartRequiresSystemd

func StartRequiresSystemd(conf *option.Conf) error

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) Start

func (m *ManagerService) Start() error

start and monitor all service

func (*ManagerService) StartSyncService

func (m *ManagerService) StartSyncService()

synchronize all service status to as we expect

func (*ManagerService) Stop

func (m *ManagerService) Stop() error

stop manager

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL