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

Method ReviseHAProxyConfiguration

internal/data_plane/haproxy/manager.go:377–390  ·  view source on GitHub ↗
(args *proto.HAProxyConfig)

Source from the content-addressed store, hash-verified

375}
376
377func (api *API) ReviseHAProxyConfiguration(args *proto.HAProxyConfig) (*proto.ActionStatus, error) {
378 dpChanges := api.ReviseDataplanes(args.Dataplanes)
379 rsChanges := api.ReviseRegistrationServers(args.RegistrationServers)
380
381 toRestart := dpChanges || rsChanges
382 if toRestart {
383 api.RestartHAProxy()
384 logrus.Info("HAProxy configuration revision done with restart!")
385 } else {
386 logrus.Info("HAProxy configuration revision done without restart!")
387 }
388
389 return &proto.ActionStatus{Success: true}, nil
390}
391
392func DisseminateHAProxyConfig(config *proto.HAProxyConfig, les *leader_election.LeaderElectionServer) {
393 for peer, conn := range les.GetPeers() {

Callers

nothing calls this directly

Calls 3

ReviseDataplanesMethod · 0.95
RestartHAProxyMethod · 0.95

Tested by

no test coverage detected