Skip to content

Commit

Permalink
Merge pull request #219 from linyuyizhipao/master
Browse files Browse the repository at this point in the history
feat:禁用与启用grpc
  • Loading branch information
kl7sn authored Feb 20, 2021
2 parents 78f2392 + bc6d7ad commit 8b67ebe
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkg/registry/etcdv3/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,12 @@ func updateAddrList(al *registry.Endpoints, prefix, scheme string, kvs ...*mvccp
xlog.Error("parse uri", xlog.FieldErrKind(ecode.ErrKindUriErr), xlog.FieldErr(err), xlog.FieldKey(string(kv.Key)))
continue
}
al.Nodes[uri.String()] = serviceInfo
if serviceInfo.Enable == true {
al.Nodes[uri.String()] = serviceInfo
} else {
delete(al.Nodes, uri.String())
}

case strings.HasPrefix(addr, "configurators/"+scheme):
addr = strings.TrimPrefix(addr, "configurators/")

Expand Down

0 comments on commit 8b67ebe

Please sign in to comment.