Added Missing Domain

This commit is contained in:
Henry Camacho 2017-03-25 20:43:31 -05:00
parent a72bbc63e4
commit 2623741ef2
1 changed files with 2 additions and 0 deletions

View File

@ -26,6 +26,7 @@ func NewDomainServerAPI(domain string, conn *Connection) (p *DomainServerAPI) {
//DomainAPI -- Container for domain and related servers //DomainAPI -- Container for domain and related servers
type DomainAPI struct { type DomainAPI struct {
DomainName string `json:"domain_name"`
TotalServers int `json:"server_total"` TotalServers int `json:"server_total"`
Servers []*DomainServerAPI `json:"servers"` Servers []*DomainServerAPI `json:"servers"`
Traffic TrafficAPI `json:"traffic"` Traffic TrafficAPI `json:"traffic"`
@ -34,6 +35,7 @@ type DomainAPI struct {
//NewDomainAPI -- Constructor //NewDomainAPI -- Constructor
func NewDomainAPI(domain string, domainLoadBalance *DomainLoadBalance) (p *DomainAPI) { func NewDomainAPI(domain string, domainLoadBalance *DomainLoadBalance) (p *DomainAPI) {
p = new(DomainAPI) p = new(DomainAPI)
p.DomainName = domain
for pos := range domainLoadBalance.connections { for pos := range domainLoadBalance.connections {
ds := NewDomainServerAPI(domain, domainLoadBalance.connections[pos]) ds := NewDomainServerAPI(domain, domainLoadBalance.connections[pos])
p.Servers = append(p.Servers, ds) p.Servers = append(p.Servers, ds)