[enhancement] optimize service/util func invoker
+ keep util funcions under service/util still used by ms/etcd as serviceUtil.xxx
+ for different implementation of datasource interface, such as  mongo, util funcs can works under directory service/util/mongo
// limitations under the License.
package etcd
-
-import (
- "encoding/json"
- pb "github.com/apache/servicecomb-service-center/pkg/registry"
- apt "github.com/apache/servicecomb-service-center/server/core"
- "github.com/apache/servicecomb-service-center/server/plugin/registry"
-)
-
-func DeleteDependencyForDeleteService(domainProject string, serviceID string, service *pb.MicroServiceKey) (registry.PluginOp, error) {
- key := apt.GenerateConsumerDependencyQueueKey(domainProject, serviceID, apt.DepsQueueUUID)
- conDep := new(pb.ConsumerDependency)
- conDep.Consumer = service
- conDep.Providers = []*pb.MicroServiceKey{}
- conDep.Override = true
- data, err := json.Marshal(conDep)
- if err != nil {
- return registry.PluginOp{}, err
- }
- return registry.OpPut(registry.WithStrKey(key), registry.WithValue(data)), nil
-}
