MCPcopy Create free account
hub / github.com/eth-easl/dirigent / RestartHAProxy

Method RestartHAProxy

internal/data_plane/haproxy/manager.go:100–109  ·  view source on GitHub ↗

RestartHAProxy Should be called to commit every action to the running instance of HAProxy

()

Source from the content-addressed store, hash-verified

98
99// RestartHAProxy Should be called to commit every action to the running instance of HAProxy
100func (api *API) RestartHAProxy() {
101 go func() {
102 logrus.Info("Restarting HAProxy...")
103
104 err := exec.Command("sudo", "systemctl", "restart", "haproxy").Run()
105 if err != nil {
106 api.forceResetHAProxy()
107 }
108 }()
109}
110
111func (api *API) forceResetHAProxy() {
112 go func() {

Callers 5

AddDataplaneMethod · 0.95
RemoveDataplaneMethod · 0.95
DeleteAllDataplanesMethod · 0.95

Calls 1

forceResetHAProxyMethod · 0.95

Tested by

no test coverage detected