Documentation
¶
Index ¶
- func GetSafeInt64(ptr *int64) int64
- func GetSafeString(ptr *string) string
- func Int64P(v int64) *int64
- func StringP(v string) *string
- type HAProxyService
- type HAProxyServiceImpl
- func (s *HAProxyServiceImpl) AddCorazaBackend() error
- func (s *HAProxyServiceImpl) AddSiteConfig(site model.Site) error
- func (s *HAProxyServiceImpl) CreateHAProxyCrtStore() error
- func (s *HAProxyServiceImpl) GetStats() (models.NativeStats, error)
- func (s *HAProxyServiceImpl) GetStatus() HAProxyStatus
- func (s *HAProxyServiceImpl) HotReloadRemoveConfig() error
- func (s *HAProxyServiceImpl) InitHAProxyConfig() error
- func (s *HAProxyServiceImpl) InitSpoeConfig() error
- func (s *HAProxyServiceImpl) Reload() error
- func (s *HAProxyServiceImpl) RemoveConfig() error
- func (s *HAProxyServiceImpl) Reset() error
- func (s *HAProxyServiceImpl) Start() error
- func (s *HAProxyServiceImpl) Stop() error
- type HAProxyStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type HAProxyService ¶
type HAProxyService interface { RemoveConfig() error HotReloadRemoveConfig() error CreateHAProxyCrtStore() error InitSpoeConfig() error InitHAProxyConfig() error AddCorazaBackend() error AddSiteConfig(site model.Site) error Start() error Reload() error Stop() error GetStatus() HAProxyStatus GetStats() (models.NativeStats, error) Reset() error }
func NewHAProxyService ¶
func NewHAProxyService(configBaseDir, haproxyBin string, ctx context.Context) (HAProxyService, error)
NewHAProxyService 创建一个新的HAProxy服务实例
type HAProxyServiceImpl ¶
type HAProxyServiceImpl struct { ConfigBaseDir string HAProxyConfigFile string // 配置文件路径 HaproxyBin string // HAProxy二进制文件路径 BackupsNumber int CertDir string // 证书目录 TransactionDir string // 事务目录 SpoeDir string // SPOE目录 SpoeTransactionDir string // SPOE事务目录 SocketFile string // 套接字文件路径 PidFile string // PID文件路径 SpoeConfigFile string // SPOE配置文件路径 SpoeAgentAddress string // SPOE代理地址 SpoeAgentPort int64 // SPOE代理端口 // contains filtered or unexported fields }
func (*HAProxyServiceImpl) AddCorazaBackend ¶
func (s *HAProxyServiceImpl) AddCorazaBackend() error
func (*HAProxyServiceImpl) AddSiteConfig ¶
func (s *HAProxyServiceImpl) AddSiteConfig(site model.Site) error
func (*HAProxyServiceImpl) CreateHAProxyCrtStore ¶
func (s *HAProxyServiceImpl) CreateHAProxyCrtStore() error
func (*HAProxyServiceImpl) GetStats ¶
func (s *HAProxyServiceImpl) GetStats() (models.NativeStats, error)
func (*HAProxyServiceImpl) GetStatus ¶
func (s *HAProxyServiceImpl) GetStatus() HAProxyStatus
func (*HAProxyServiceImpl) HotReloadRemoveConfig ¶
func (s *HAProxyServiceImpl) HotReloadRemoveConfig() error
func (*HAProxyServiceImpl) InitHAProxyConfig ¶
func (s *HAProxyServiceImpl) InitHAProxyConfig() error
InitHAProxyConfig 初始化HAProxy配置
func (*HAProxyServiceImpl) InitSpoeConfig ¶
func (s *HAProxyServiceImpl) InitSpoeConfig() error
func (*HAProxyServiceImpl) Reload ¶
func (s *HAProxyServiceImpl) Reload() error
func (*HAProxyServiceImpl) RemoveConfig ¶
func (s *HAProxyServiceImpl) RemoveConfig() error
func (*HAProxyServiceImpl) Reset ¶
func (s *HAProxyServiceImpl) Reset() error
func (*HAProxyServiceImpl) Start ¶
func (s *HAProxyServiceImpl) Start() error
func (*HAProxyServiceImpl) Stop ¶
func (s *HAProxyServiceImpl) Stop() error
type HAProxyStatus ¶
type HAProxyStatus int32
const ( StatusStopped HAProxyStatus = iota StatusRunning StatusError )
Click to show internal directories.
Click to hide internal directories.