system_service

package
v0.3.11-8 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2024 License: Apache-2.0 Imports: 12 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init()

func SetOpenvswitchName

func SetOpenvswitchName(name string)

Types

type IServiceManager

type IServiceManager interface {
	Detect() bool
	Start(srvname string) error
	Enable(srvname string) error
	Stop(srvname string) error
	Disable(srvname string) error
	GetStatus(srvname string) SServiceStatus
}
var (
	SysVServiceManager IServiceManager = &SSysVServiceManager{}
)
var (
	SystemdServiceManager IServiceManager = &SSystemdServiceManager{}
)

type ISystemService

type ISystemService interface {
	IsInstalled() bool
	IsActive() bool
	IsEnabled() bool

	Start(enable bool) error
	Stop(disable bool) error
	GetConfig(map[string]interface{}) string
	SetConf(interface{})
	GetConf() interface{}
	BgReload(kwargs map[string]interface{})
	BgReloadConf(kwargs map[string]interface{})
	Enable() error
	Disable() error
	Reload(kwargs map[string]interface{}) error
}

func GetService

func GetService(name string) ISystemService

type NewServiceFunc

type NewServiceFunc func()

type SBaseSystemService

type SBaseSystemService struct {
	// contains filtered or unexported fields
}

func NewBaseSystemService

func NewBaseSystemService(name string, urls interface{}) *SBaseSystemService

func (*SBaseSystemService) BgReloadConf

func (s *SBaseSystemService) BgReloadConf(kwargs map[string]interface{})

func (*SBaseSystemService) Disable

func (s *SBaseSystemService) Disable() error

func (*SBaseSystemService) Enable

func (s *SBaseSystemService) Enable() error

func (*SBaseSystemService) GetConf

func (s *SBaseSystemService) GetConf() interface{}

func (*SBaseSystemService) GetConfig

func (s *SBaseSystemService) GetConfig(map[string]interface{}) string

func (*SBaseSystemService) GetConfigFile

func (s *SBaseSystemService) GetConfigFile() string

func (*SBaseSystemService) IsActive

func (s *SBaseSystemService) IsActive() bool

func (*SBaseSystemService) IsEnabled

func (s *SBaseSystemService) IsEnabled() bool

func (*SBaseSystemService) IsInstalled

func (s *SBaseSystemService) IsInstalled() bool

func (*SBaseSystemService) SetConf

func (s *SBaseSystemService) SetConf(urls interface{})

func (*SBaseSystemService) Start

func (s *SBaseSystemService) Start(enable bool) error

func (*SBaseSystemService) Stop

func (s *SBaseSystemService) Stop(disable bool) error

type SDocker

type SDocker struct {
	*SBaseSystemService
}

func NewDockerService

func NewDockerService() *SDocker

func (*SDocker) BgReload

func (s *SDocker) BgReload(kwargs map[string]interface{})

func (*SDocker) BgReloadConf

func (s *SDocker) BgReloadConf(kwargs map[string]interface{})

func (*SDocker) GetConfig

func (s *SDocker) GetConfig(kwargs map[string]interface{}) string

func (*SDocker) GetConfigFile

func (s *SDocker) GetConfigFile() string

func (*SDocker) Reload

func (s *SDocker) Reload(kwargs map[string]interface{}) error

type SFluentbit

type SFluentbit struct {
	*SBaseSystemService
}

func NewFluentbitService

func NewFluentbitService() *SFluentbit

func (*SFluentbit) BgReload

func (s *SFluentbit) BgReload(kwargs map[string]interface{})

func (*SFluentbit) BgReloadConf

func (s *SFluentbit) BgReloadConf(kwargs map[string]interface{})

func (*SFluentbit) GetConfig

func (s *SFluentbit) GetConfig(kwargs map[string]interface{}) string

func (*SFluentbit) GetConfigFile

func (s *SFluentbit) GetConfigFile() string

func (*SFluentbit) Reload

func (s *SFluentbit) Reload(kwargs map[string]interface{}) error

type SHostDeployer

type SHostDeployer struct {
	*SBaseSystemService
}

func NewHostDeployerService

func NewHostDeployerService() *SHostDeployer

func (*SHostDeployer) BgReload

func (s *SHostDeployer) BgReload(kwargs map[string]interface{})

func (*SHostDeployer) BgReloadConf

func (s *SHostDeployer) BgReloadConf(kwargs map[string]interface{})

func (*SHostDeployer) Reload

func (s *SHostDeployer) Reload(kwargs map[string]interface{}) error

type SHostSdnagent

type SHostSdnagent struct {
	*SBaseSystemService
}

func NewHostSdnagentService

func NewHostSdnagentService() *SHostSdnagent

func (*SHostSdnagent) BgReload

func (s *SHostSdnagent) BgReload(kwargs map[string]interface{})

func (*SHostSdnagent) BgReloadConf

func (s *SHostSdnagent) BgReloadConf(kwargs map[string]interface{})

func (*SHostSdnagent) Reload

func (s *SHostSdnagent) Reload(kwargs map[string]interface{}) error

type SKubeAgent

type SKubeAgent struct {
	*SBaseSystemService
}

func NewKubeAgentService

func NewKubeAgentService() *SKubeAgent

func (*SKubeAgent) BgReload

func (s *SKubeAgent) BgReload(kwargs map[string]interface{})

func (*SKubeAgent) BgReloadConf

func (s *SKubeAgent) BgReloadConf(kwargs map[string]interface{})

func (*SKubeAgent) GetConfig

func (s *SKubeAgent) GetConfig(kwargs map[string]interface{}) string

func (*SKubeAgent) GetConfigFile

func (s *SKubeAgent) GetConfigFile() string

func (*SKubeAgent) Reload

func (s *SKubeAgent) Reload(kwargs map[string]interface{}) error

type SLxcfs

type SLxcfs struct {
	*SBaseSystemService
}

func NewLxcfsService

func NewLxcfsService() *SLxcfs

func (*SLxcfs) BgReload

func (s *SLxcfs) BgReload(kwargs map[string]interface{})

func (*SLxcfs) Reload

func (s *SLxcfs) Reload(kwargs map[string]interface{}) error

type SNtpd

type SNtpd struct {
	*SBaseSystemService
}

func NewNtpdService

func NewNtpdService() *SNtpd

func (*SNtpd) BgReload

func (s *SNtpd) BgReload(kwargs map[string]interface{})

func (*SNtpd) BgReloadConf

func (s *SNtpd) BgReloadConf(kwargs map[string]interface{})

func (*SNtpd) GetConfig

func (s *SNtpd) GetConfig(kwargs map[string]interface{}) string

func (*SNtpd) GetConfigFile

func (s *SNtpd) GetConfigFile() string

func (*SNtpd) Reload

func (s *SNtpd) Reload(kwargs map[string]interface{}) error

type SOpenvswitch

type SOpenvswitch struct {
	*SBaseSystemService
}

func NewOpenvswitchService

func NewOpenvswitchService() *SOpenvswitch

func (*SOpenvswitch) BgReload

func (s *SOpenvswitch) BgReload(kwargs map[string]interface{})

func (*SOpenvswitch) BgReloadConf

func (s *SOpenvswitch) BgReloadConf(kwargs map[string]interface{})

func (*SOpenvswitch) Reload

func (s *SOpenvswitch) Reload(kwargs map[string]interface{}) error

type SOvnController

type SOvnController struct {
	*SBaseSystemService
}

func NewOvnControllerService

func NewOvnControllerService() *SOvnController

func (*SOvnController) BgReload

func (s *SOvnController) BgReload(kwargs map[string]interface{})

func (*SOvnController) BgReloadConf

func (s *SOvnController) BgReloadConf(kwargs map[string]interface{})

func (*SOvnController) Reload

func (s *SOvnController) Reload(kwargs map[string]interface{}) error

type SServiceStatus

type SServiceStatus struct {
	Enabled bool
	Loaded  bool
	Active  bool
}

type SSysVServiceManager

type SSysVServiceManager struct {
}

func (*SSysVServiceManager) Detect

func (manager *SSysVServiceManager) Detect() bool

func (*SSysVServiceManager) Disable

func (manager *SSysVServiceManager) Disable(srvname string) error

func (*SSysVServiceManager) Enable

func (manager *SSysVServiceManager) Enable(srvname string) error

func (*SSysVServiceManager) GetStatus

func (manager *SSysVServiceManager) GetStatus(srvname string) SServiceStatus

func (*SSysVServiceManager) Start

func (manager *SSysVServiceManager) Start(srvname string) error

func (*SSysVServiceManager) Stop

func (manager *SSysVServiceManager) Stop(srvname string) error

type SSystemdServiceManager

type SSystemdServiceManager struct {
}

func (*SSystemdServiceManager) Detect

func (manager *SSystemdServiceManager) Detect() bool

func (*SSystemdServiceManager) Disable

func (manager *SSystemdServiceManager) Disable(srvname string) error

func (*SSystemdServiceManager) Enable

func (manager *SSystemdServiceManager) Enable(srvname string) error

func (*SSystemdServiceManager) GetStatus

func (manager *SSystemdServiceManager) GetStatus(srvname string) SServiceStatus

func (*SSystemdServiceManager) Start

func (manager *SSystemdServiceManager) Start(srvname string) error

func (*SSystemdServiceManager) Stop

func (manager *SSystemdServiceManager) Stop(srvname string) error

type STelegraf

type STelegraf struct {
	*SBaseSystemService
}

func NewTelegrafService

func NewTelegrafService() *STelegraf

func (*STelegraf) BgReload

func (s *STelegraf) BgReload(kwargs map[string]interface{})

func (*STelegraf) BgReloadConf

func (s *STelegraf) BgReloadConf(kwargs map[string]interface{})

func (*STelegraf) GetConfig

func (s *STelegraf) GetConfig(kwargs map[string]interface{}) string

func (*STelegraf) GetConfigFile

func (s *STelegraf) GetConfigFile() string

func (*STelegraf) Reload

func (s *STelegraf) Reload(kwargs map[string]interface{}) error

func (*STelegraf) ReloadTelegraf

func (s *STelegraf) ReloadTelegraf() error

Jump to

Keyboard shortcuts

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