Don't publish the process rpc call and embed the router handler in the network

This commit is contained in:
Asim Aslam
2019-07-31 16:36:53 +01:00
parent b1c49a0ddc
commit 7884e889f4
3 changed files with 90 additions and 4 deletions

View File

@@ -142,6 +142,11 @@ func NewServer(opt ...Option) Server {
return newRpcServer(opt...)
}
// NewRouter returns a new router
func NewRouter() *router {
return newRpcRouter()
}
// NewSubscriber creates a new subscriber interface with the given topic
// and handler using the default server
func NewSubscriber(topic string, h interface{}, opts ...SubscriberOption) Subscriber {