jeudi 29 novembre 2018

Expose all registered RPC methods and signature

func main(parallel bool, debug bool) {
    arith := new(Arith)
    rpc.Register(arith)

    tcpAddr, err := net.ResolveTCPAddr("tcp", ":1234")
    checkError(err)

    listener, err := net.ListenTCP("tcp", tcpAddr)
    checkError(err)

    .......

}

In golang, is it possible to get a 'list' of all registered RPC methods with name and signatures?

What I want to achieve is:

  • Make multiple RPC servers register all their methods and signature to a central control center with web interface

  • From the web interface, I can invoke any methods of any registered rpc methods with parameters accordingly





Aucun commentaire:

Enregistrer un commentaire