Commit 7e18deea authored by luxq's avatar luxq

add registry info delete

parent 8851b53e
...@@ -94,6 +94,15 @@ func (s *Registry) Start() { ...@@ -94,6 +94,15 @@ func (s *Registry) Start() {
} }
} }
func (s *Registry) Clear() {
instance := os.Getenv(REGISTRY_SERVICE_INSTANCE)
for _, opt := range s.opts {
instance = opt()
}
k := fmt.Sprintf("%s%s", common.GetServiceKeyPrefix(s.register.ServiceType()), instance)
s.rdb.Del(context.Background(), k)
}
func (s *Registry) Stop() { func (s *Registry) Stop() {
close(s.quit) close(s.quit)
} }
......
Markdown is supported
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