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

Method listServers

internal/data_plane/haproxy/manager.go:132–144  ·  view source on GitHub ↗
(backend string)

Source from the content-addressed store, hash-verified

130}
131
132func (api *API) listServers(backend string) (names []string, addresses []string) {
133 _, servers, err := api.client.Configuration.GetServers(backend, "")
134 if err != nil {
135 fmt.Println(err.Error())
136 }
137
138 for _, s := range servers {
139 names = append(names, s.Name)
140 addresses = append(addresses, fmt.Sprintf("%s:%d", s.Address, *s.Port))
141 }
142
143 return names, addresses
144}
145
146func (api *API) AddDataplane(ipAddress string, port int, restart bool) {
147 version, err := api.client.Configuration.GetVersion("")

Callers 2

ListDataplanesMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected