registry/service: pass domain options via rpc (#1719)
* registry/service: regenerate proto * registry/service: pass domain in proto request options * registry/service: stop defaulting metadata * registry: add default domain const; remove from implementations * registry/memory: fix typo
This commit is contained in:
@@ -12,12 +12,12 @@ service Registry {
|
||||
|
||||
// Service represents a go-micro service
|
||||
message Service {
|
||||
string name = 1;
|
||||
string version = 2;
|
||||
map<string,string> metadata = 3;
|
||||
repeated Endpoint endpoints = 4;
|
||||
repeated Node nodes = 5;
|
||||
Options options = 6;
|
||||
string name = 1;
|
||||
string version = 2;
|
||||
map<string,string> metadata = 3;
|
||||
repeated Endpoint endpoints = 4;
|
||||
repeated Node nodes = 5;
|
||||
Options options = 6;
|
||||
}
|
||||
|
||||
// Node represents the node the service is on
|
||||
@@ -45,7 +45,8 @@ message Value {
|
||||
|
||||
// Options are registry options
|
||||
message Options {
|
||||
int64 ttl = 1;
|
||||
int64 ttl = 1;
|
||||
string domain = 2;
|
||||
}
|
||||
|
||||
// Result is returns by the watcher
|
||||
@@ -59,6 +60,7 @@ message EmptyResponse {}
|
||||
|
||||
message GetRequest {
|
||||
string service = 1;
|
||||
Options options = 2;
|
||||
}
|
||||
|
||||
message GetResponse {
|
||||
@@ -66,7 +68,7 @@ message GetResponse {
|
||||
}
|
||||
|
||||
message ListRequest {
|
||||
// TODO: filtering
|
||||
Options options = 1;
|
||||
}
|
||||
|
||||
message ListResponse {
|
||||
@@ -76,23 +78,24 @@ message ListResponse {
|
||||
message WatchRequest {
|
||||
// service is optional
|
||||
string service = 1;
|
||||
Options options = 2;
|
||||
}
|
||||
|
||||
// EventType defines the type of event
|
||||
enum EventType {
|
||||
Create = 0;
|
||||
Delete = 1;
|
||||
Update = 2;
|
||||
Create = 0;
|
||||
Delete = 1;
|
||||
Update = 2;
|
||||
}
|
||||
|
||||
// Event is registry event
|
||||
message Event {
|
||||
// Event Id
|
||||
string id = 1;
|
||||
// type of event
|
||||
EventType type = 2;
|
||||
// unix timestamp of event
|
||||
int64 timestamp = 3;
|
||||
// service entry
|
||||
Service service = 4;
|
||||
// Event Id
|
||||
string id = 1;
|
||||
// type of event
|
||||
EventType type = 2;
|
||||
// unix timestamp of event
|
||||
int64 timestamp = 3;
|
||||
// service entry
|
||||
Service service = 4;
|
||||
}
|
||||
|
Reference in New Issue
Block a user