conhaifeng / dubbo-telnet

Manage dubbo service by telent

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

dubbo-telnet

What Is dubbo-telnet?

a simple tool to manage dubbo service by telnet

Support dubbo command?

  1. ls -l interface
  2. invoke com.xx.yy.interface.method(xx,yy)

Example

  1. ls -l interface
du = Dubbo(ip, port)
service = du.list_service('com.test.shared.service.MyService')
  1. invoke com.xx.yy.interface.method(xx,yy)

if arguments is primitive types

du = Dubbo(ip, port)
interface = 'com.test.shared.service.MyService'
method = 'getById'
id = '00001'
name = 'my_name'
json_data = du.invoke_service(interface,method, id=id, name=name)

if method no arguments, call like this:

json_data = du.invoke_service(interface,method)

if arguments include model, you must add the class of the model to the param

person = {}
person["id"] = "user01"
person["name"] = 'test'
person["class"] = "com.test.shared.model.Person"

interface = 'com.test.shared.service.MyService'
method = "addTradeInfo"

resp = du.invoke_service(interface, method, person = person)

About

Manage dubbo service by telent


Languages

Language:Python 100.0%