(args *proto.HAProxyConfig)
| 375 | } |
| 376 | |
| 377 | func (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 | |
| 392 | func DisseminateHAProxyConfig(config *proto.HAProxyConfig, les *leader_election.LeaderElectionServer) { |
| 393 | for peer, conn := range les.GetPeers() { |
nothing calls this directly
no test coverage detected