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

Function NewHAProxyAPI

internal/data_plane/haproxy/manager.go:64–79  ·  view source on GitHub ↗
(loadBalancerAddress string)

Source from the content-addressed store, hash-verified

62}
63
64func NewHAProxyAPI(loadBalancerAddress string) *API {
65 api := &API{
66 client: getHAProxyClient(),
67 lbAddress: loadBalancerAddress,
68
69 addressToName: make(map[string]string),
70 }
71
72 names, addresses := api.ListDataplanes()
73 for i := 0; i < len(names); i++ {
74 // no need for locking as no one is using the API object
75 api.addressToName[addresses[i]] = names[i]
76 }
77
78 return api
79}
80
81func (api *API) StartHAProxy() {
82 go func() {

Callers 3

CreateNewCpApiServerFunction · 0.92
TestDataplanesBackendFunction · 0.85

Calls 2

ListDataplanesMethod · 0.95
getHAProxyClientFunction · 0.85

Tested by 2

TestDataplanesBackendFunction · 0.68