Commit 099d3259 authored by Akshay Bharambe's avatar Akshay Bharambe
Browse files

Minor fixes

parent e74b4924
2 merge requests!180Mep release 07042020,!175Add: Graph Database support
Showing with 13 additions and 11 deletions
......@@ -13,13 +13,14 @@ import (
)
type Host struct {
Name string `json:"hostName"`
Server string `json:"server"`
Port int `json:"port"`
Name string `json:"hostName"`
Server string `json:"server"`
Port int `json:"port"`
IsDefault bool `json:"isDefault"`
IsDisabled bool `json:"IsDisabled"`
// UserName string
// Password string
IsDefault bool `json:"isDefault"`
IsDisabled bool `json:"IsDisabled"`
}
type Instance struct {
......@@ -112,6 +113,8 @@ func InitInstances(configs []Host) error {
}
}
configured = true
return nil
}
......@@ -255,12 +258,11 @@ func (dg *DGraphDAO) DropEdge(ctx context.Context, uid string, predicates ...str
}
func bindDgraphServerWithPort(server string, port int) string {
// if port is empty then used default port 27017 & bind to server ip
var serverURI string
// if port is empty then use default port 9080(GRPC Port) & bind to server ip
if port <= 0 || strings.TrimSpace(strconv.Itoa(port)) == "" {
serverURI = server + ":9080"
} else {
serverURI = server + ":" + strconv.Itoa(port)
return server + ":9080"
}
return serverURI
return server + ":" + strconv.Itoa(port)
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment