Documentation ¶
Overview ¶
Package nginx xxx
Index ¶
- func NewManager(binPath, cfgPath, generatePath, backupPath, templatePath string) conf.Manager
- type Manager
- func (m *Manager) CheckDifference(oldFile, curFile string) bool
- func (m *Manager) Collect(ch chan<- prometheus.Metric)
- func (m *Manager) Create(tmpData *types.TemplateData) (string, error)
- func (m *Manager) Describe(ch chan<- *prometheus.Desc)
- func (m *Manager) GetStatusFunction() restful.RouteFunction
- func (m *Manager) Reload(cfgFile string) error
- func (m *Manager) Replace(oldFile, curFile string) error
- func (m *Manager) Start() error
- func (m *Manager) Stop()
- func (m *Manager) TryUpdateWithoutReload(tmpData *types.TemplateData) (needReload bool)
- func (m *Manager) Validate(newFile string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewManager ¶
NewManager create haproxy config file manager
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager implements TemplateManager interface, control nginx config file generating, validation, backup and reloading
func (*Manager) CheckDifference ¶
CheckDifference two file are difference, true is difference
func (*Manager) Collect ¶
func (m *Manager) Collect(ch chan<- prometheus.Metric)
Collect implements collector interface
func (*Manager) Create ¶
func (m *Manager) Create(tmpData *types.TemplateData) (string, error)
Create config file with tmpData,
func (*Manager) Describe ¶
func (m *Manager) Describe(ch chan<- *prometheus.Desc)
Describe implements collector interface
func (*Manager) GetStatusFunction ¶
func (m *Manager) GetStatusFunction() restful.RouteFunction
GetStatusFunction get status function
func (*Manager) TryUpdateWithoutReload ¶
func (m *Manager) TryUpdateWithoutReload(tmpData *types.TemplateData) (needReload bool)
TryUpdateWithoutReload update haproxy config without reloading needReload: true for reload
Click to show internal directories.
Click to hide internal directories.