nginx

package
v1.27.0-alpha.17 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewManager

func NewManager(binPath, cfgPath, generatePath, backupPath, templatePath string) conf.Manager

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

func (m *Manager) CheckDifference(oldFile, curFile string) bool

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

func (m *Manager) Reload(cfgFile string) error

Reload haproxy with new config file

func (*Manager) Replace

func (m *Manager) Replace(oldFile, curFile string) error

Replace old cfg file with cur one, return old file backup

func (*Manager) Start

func (m *Manager) Start() error

Start point, do not block

func (*Manager) Stop

func (m *Manager) Stop()

Stop stop

func (*Manager) TryUpdateWithoutReload

func (m *Manager) TryUpdateWithoutReload(tmpData *types.TemplateData) (needReload bool)

TryUpdateWithoutReload update haproxy config without reloading needReload: true for reload

func (*Manager) Validate

func (m *Manager) Validate(newFile string) bool

Validate new cfg file grammar is OK

Jump to

Keyboard shortcuts

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