提交 c88f697e 编写于 作者: H heyanlong

fix #195 #196 #194

上级 7ab255a6
...@@ -195,13 +195,6 @@ func (t *Agent) doRegister(r *register) { ...@@ -195,13 +195,6 @@ func (t *Agent) doRegister(r *register) {
var instances []*register2.ServiceInstance var instances []*register2.ServiceInstance
var properties []*common.KeyStringValuePair var properties []*common.KeyStringValuePair
instances = append(instances, &register2.ServiceInstance{
ServiceId: appId,
InstanceUUID: agentUUID,
Time: time.Now().UnixNano() / 1000000,
Properties: properties,
})
properties = append(properties, &common.KeyStringValuePair{ properties = append(properties, &common.KeyStringValuePair{
Key: "os_name", Key: "os_name",
Value: runtime.GOOS, Value: runtime.GOOS,
...@@ -214,7 +207,7 @@ func (t *Agent) doRegister(r *register) { ...@@ -214,7 +207,7 @@ func (t *Agent) doRegister(r *register) {
properties = append(properties, &common.KeyStringValuePair{ properties = append(properties, &common.KeyStringValuePair{
Key: "process_no", Key: "process_no",
Value: string(pid), Value: strconv.Itoa(pid),
}) })
properties = append(properties, &common.KeyStringValuePair{ properties = append(properties, &common.KeyStringValuePair{
...@@ -229,6 +222,13 @@ func (t *Agent) doRegister(r *register) { ...@@ -229,6 +222,13 @@ func (t *Agent) doRegister(r *register) {
}) })
} }
instances = append(instances, &register2.ServiceInstance{
ServiceId: appId,
InstanceUUID: agentUUID,
Time: time.Now().UnixNano() / 1000000,
Properties: properties,
})
instanceReq := &register2.ServiceInstances{ instanceReq := &register2.ServiceInstances{
Instances: instances, Instances: instances,
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册