Skip to content
Snippets Groups Projects
Verified Commit f1425a03 authored by meskio's avatar meskio :tent: Committed by Sam Whited
Browse files

Make API configurable

parent cc78ed34
Branches
Tags
1 merge request!11Add a load balancer
...@@ -22,6 +22,10 @@ import ( ...@@ -22,6 +22,10 @@ import (
"net/http" "net/http"
) )
const (
eipAPI = "/3/config/eip-service.json"
)
type bonafide struct { type bonafide struct {
client *http.Client client *http.Client
eip *eipService eip *eipService
...@@ -52,8 +56,11 @@ type coordinates struct { ...@@ -52,8 +56,11 @@ type coordinates struct {
func newBonafide(apiDomain string) *bonafide { func newBonafide(apiDomain string) *bonafide {
client := &http.Client{} client := &http.Client{}
eipAPI := apiDomain + "/3/config/eip-service.json" api := apiDomain + eipAPI
return &bonafide{client, nil, eipAPI} return &bonafide{
client: client,
eipAPI: api,
}
} }
func (b *bonafide) getGateways() ([]gateway, error) { func (b *bonafide) getGateways() ([]gateway, error) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment