Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
4 changed files
with
117 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -8,6 +8,7 @@ | ||
from registry import ( | ||
Registry, | ||
ZookeeperRegistry, | ||
MulticastRegistry | ||
) | ||
from config import ( | ||
ApplicationConfig, | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,16 @@ | ||
from dubbo_client import ZookeeperRegistry | ||
from dubbo_client import ZookeeperRegistry, MulticastRegistry | ||
|
||
__author__ = 'caozupeng' | ||
|
||
if __name__ == '__main__': | ||
def multicat(): | ||
registry = MulticastRegistry('224.5.6.7:1234') | ||
registry.subscribe('com.ofpay.demo.api.UserProvider') | ||
print registry.get_provides('com.ofpay.demo.api.UserProvider') | ||
|
||
def zookeeper(): | ||
registry = ZookeeperRegistry('172.19.65.33:2181') | ||
registry.subscribe('com.ofpay.demo.api.UserProvider') | ||
print registry.get_provides('com.ofpay.demo.api.UserProvider') | ||
print registry.get_provides('com.ofpay.demo.api.UserProvider') | ||
|
||
if __name__ == '__main__': | ||
multicat() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters