add Network.Connect handler and network/metadata fields to node
This commit is contained in:
		| @@ -6,6 +6,8 @@ import "github.com/micro/go-micro/router/proto/router.proto"; | ||||
|  | ||||
| // Network service is usesd to gain visibility into networks | ||||
| service Network { | ||||
| 	// Connect to the network | ||||
| 	rpc Connect(ConnectRequest) returns (ConnectResponse) {}; | ||||
| 	// Returns the entire network graph | ||||
| 	rpc Graph(GraphRequest) returns (GraphResponse) {}; | ||||
| 	// Returns a list of known nodes in the network | ||||
| @@ -25,6 +27,12 @@ message Query { | ||||
| 	string network = 5; | ||||
| } | ||||
|  | ||||
| message ConnectRequest { | ||||
| 	repeated Node nodes = 1; | ||||
| } | ||||
|  | ||||
| message ConnectResponse {} | ||||
|  | ||||
| // PeerRequest requests list of peers | ||||
| message NodesRequest { | ||||
|         // node topology depth | ||||
| @@ -67,6 +75,10 @@ message Node { | ||||
|         string id = 1; | ||||
|         // node address | ||||
|         string address = 2; | ||||
| 	// the network | ||||
| 	string network = 3; | ||||
| 	// associated metadata | ||||
| 	map<string,string> metadata = 4; | ||||
| } | ||||
|  | ||||
| // Connect is sent when the node connects to the network | ||||
|   | ||||
		Reference in New Issue
	
	Block a user