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

Method AddDataplane

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

Source from the content-addressed store, hash-verified

144}
145
146func (api *API) AddDataplane(ipAddress string, port int, restart bool) {
147 version, err := api.client.Configuration.GetVersion("")
148 if err != nil {
149 logrus.Errorf("Failed to add server to HAProxy backend. Error getting configuration version - %v", err)
150 return
151 }
152
153 api.addServer(ipAddress, port, "", version)
154
155 if restart {
156 api.RestartHAProxy()
157 }
158}
159
160func (api *API) RemoveDataplane(ipAddress string, port int, restart bool) {
161 version, err := api.client.Configuration.GetVersion("")

Callers 2

TestDataplanesBackendFunction · 0.80
RegisterDataplaneMethod · 0.80

Calls 2

addServerMethod · 0.95
RestartHAProxyMethod · 0.95

Tested by 1

TestDataplanesBackendFunction · 0.64