add web api

This commit is contained in:
ginuerzh
2022-02-08 23:46:54 +08:00
parent 0fba6d2500
commit f1eaef8d69
22 changed files with 1209 additions and 33 deletions

View File

@ -30,6 +30,11 @@ func (r *serviceRegistry) Unregister(name string) {
r.m.Delete(name)
}
func (r *serviceRegistry) IsRegistered(name string) bool {
_, ok := r.m.Load(name)
return ok
}
func (r *serviceRegistry) Get(name string) *service.Service {
v, ok := r.m.Load(name)
if !ok {