robotLJW commented on a change in pull request #1211:
URL:
https://github.com/apache/servicecomb-service-center/pull/1211#discussion_r780881571
##########
File path: datasource/etcd/ms.go
##########
@@ -599,12 +602,35 @@ func (ds *MetadataManager) registerInstance(ctx
context.Context, request *pb.Reg
instanceFlag, instanceID, remoteIP), nil)
return "", pb.NewError(pb.ErrServiceNotExists, "Service does
not exist.")
}
-
+ sendEvent(sync.CreateAction, datasource.ResourceInstance, request)
log.Info(fmt.Sprintf("register instance %s, instanceID %s, operator %s",
instanceFlag, instanceID, remoteIP))
return instanceID, nil
}
+func sendEvent(action string, resourceType string, resource interface{}) {
Review comment:
这边抽了一部分放到syncer的service下面了
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]