mirror of
https://github.com/dragonheim/gagent.git
synced 2025-04-26 03:28:59 -07:00
refactor: converted int64 to int32 where appropriate.
refactor: reduced usage of fmt in favor of logs and string concatication. refactor: minor re-ordering of the data structures to reduce storage space required.
This commit is contained in:
parent
8640d42132
commit
1bcc682b7c
9 changed files with 53 additions and 48 deletions
|
@ -24,9 +24,9 @@ func Main(wg *sync.WaitGroup, config gs.GagentConfig) {
|
|||
rootBody.SetAttributeValue("mode", cty.StringVal(config.Mode))
|
||||
rootBody.SetAttributeValue("uuid", cty.StringVal(config.UUID))
|
||||
rootBody.SetAttributeValue("listenaddr", cty.StringVal("0.0.0.0"))
|
||||
rootBody.SetAttributeValue("clientport", cty.NumberIntVal(config.ClientPort))
|
||||
rootBody.SetAttributeValue("routerport", cty.NumberIntVal(config.RouterPort))
|
||||
rootBody.SetAttributeValue("workerport", cty.NumberIntVal(config.WorkerPort))
|
||||
rootBody.SetAttributeValue("clientport", cty.NumberIntVal(int64(config.ClientPort)))
|
||||
rootBody.SetAttributeValue("routerport", cty.NumberIntVal(int64(config.RouterPort)))
|
||||
rootBody.SetAttributeValue("workerport", cty.NumberIntVal(int64(config.WorkerPort)))
|
||||
rootBody.AppendNewline()
|
||||
|
||||
clientBlock1 := rootBody.AppendNewBlock("client", []string{config.Name})
|
||||
|
@ -47,9 +47,9 @@ func Main(wg *sync.WaitGroup, config gs.GagentConfig) {
|
|||
routerBody1 := routerBlock1.Body()
|
||||
routerBody1.SetAttributeValue("routerid", cty.StringVal(config.UUID))
|
||||
routerBody1.SetAttributeValue("address", cty.StringVal("127.0.0.1"))
|
||||
routerBody1.SetAttributeValue("clientport", cty.NumberIntVal(config.ClientPort))
|
||||
routerBody1.SetAttributeValue("routerport", cty.NumberIntVal(config.RouterPort))
|
||||
routerBody1.SetAttributeValue("workerport", cty.NumberIntVal(config.WorkerPort))
|
||||
routerBody1.SetAttributeValue("clientport", cty.NumberIntVal(int64(config.ClientPort)))
|
||||
routerBody1.SetAttributeValue("routerport", cty.NumberIntVal(int64(config.RouterPort)))
|
||||
routerBody1.SetAttributeValue("workerport", cty.NumberIntVal(int64(config.WorkerPort)))
|
||||
rootBody.AppendNewline()
|
||||
|
||||
workerBlock1 := rootBody.AppendNewBlock("worker", []string{config.Name})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue