micro/network/proto/network.proto

35 lines
710 B
Protocol Buffer
Raw Normal View History

2019-07-01 13:55:15 +03:00
syntax = "proto3";
package go.micro.network;
// A connect message is for connecting to the network
message Connect {
2019-07-03 21:26:24 +03:00
// the unique muid (mac) address of the node
string muid = 1;
2019-07-01 13:55:15 +03:00
// Lease specifies an existing lease to indicate
// we don't need a new address, we just want to
// establish a link.
2019-07-03 21:26:24 +03:00
Lease lease = 2;
2019-07-01 13:55:15 +03:00
}
2019-07-03 21:26:24 +03:00
// A lease is returned to anyone attempting to connect with a valid muid.
2019-07-01 13:55:15 +03:00
message Lease {
// unique lease id
string id = 1;
// timestamp of lease
int64 timestamp = 2;
2019-07-03 21:26:24 +03:00
// author is the muid of the author
string author = 3;
2019-07-01 13:55:15 +03:00
// the node
2019-07-03 21:26:24 +03:00
Node node = 4;
2019-07-01 13:55:15 +03:00
}
// A node is the network node
message Node {
2019-07-03 21:26:24 +03:00
string muid = 1;
string id = 2;
string address = 3;
string network = 4;
2019-07-01 13:55:15 +03:00
}