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

Method RemoveDataplane

internal/data_plane/haproxy/manager.go:160–172  ·  view source on GitHub ↗
(ipAddress string, port int, restart bool)

Source from the content-addressed store, hash-verified

158}
159
160func (api *API) RemoveDataplane(ipAddress string, port int, restart bool) {
161 version, err := api.client.Configuration.GetVersion("")
162 if err != nil {
163 logrus.Errorf("Failed to add server to HAProxy backend. Error getting configuration version - %v", err)
164 return
165 }
166
167 api.removeServerByName(ipAddress, port, "", version)
168
169 if restart {
170 api.RestartHAProxy()
171 }
172}
173
174func (api *API) addServer(ipAddress string, port int, transaction string, version int64) {
175 name := fmt.Sprintf("%s%d", DataplanePrefix, rand.Int())

Callers 3

DeleteAllDataplanesMethod · 0.95
TestDataplanesBackendFunction · 0.45
DeregisterDataplaneMethod · 0.45

Calls 2

removeServerByNameMethod · 0.95
RestartHAProxyMethod · 0.95

Tested by 1

TestDataplanesBackendFunction · 0.36