2022-05-23 14:37:52 +00:00
|
|
|
// Package serverdiscovery provides a service on Consul servers to discover the set of servers
|
2022-04-21 16:56:18 +00:00
|
|
|
// currently able to handle incoming requests.
|
|
|
|
|
|
|
|
syntax = "proto3";
|
|
|
|
|
2022-07-22 18:59:34 +00:00
|
|
|
package hashicorp.consul.serverdiscovery;
|
2022-04-21 16:56:18 +00:00
|
|
|
|
2023-02-17 21:14:46 +00:00
|
|
|
import "annotations/ratelimit/ratelimit.proto";
|
2023-01-04 16:07:02 +00:00
|
|
|
|
2022-04-21 16:56:18 +00:00
|
|
|
service ServerDiscoveryService {
|
2022-05-23 14:37:52 +00:00
|
|
|
// WatchServers will stream back sets of ready servers as they change such as
|
|
|
|
// when new servers are added or older ones removed. A ready server is one that
|
|
|
|
// should be considered ready for sending general RPC requests towards that would
|
|
|
|
// catalog queries, xDS proxy configurations and similar services.
|
2023-01-04 16:07:02 +00:00
|
|
|
rpc WatchServers(WatchServersRequest) returns (stream WatchServersResponse) {
|
2023-02-17 21:14:46 +00:00
|
|
|
option (hashicorp.consul.internal.ratelimit.spec) = {operation_type: OPERATION_TYPE_READ};
|
2023-01-04 16:07:02 +00:00
|
|
|
}
|
2022-04-21 16:56:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message WatchServersRequest {
|
2022-05-23 14:37:52 +00:00
|
|
|
// Wan being set to true will cause WAN addresses to be sent in the response
|
|
|
|
// instead of the LAN addresses which are the default
|
|
|
|
bool wan = 1;
|
2022-04-21 16:56:18 +00:00
|
|
|
}
|
|
|
|
|
2022-05-23 14:37:52 +00:00
|
|
|
message WatchServersResponse {
|
|
|
|
// Servers is the list of server address information.
|
|
|
|
repeated Server servers = 1;
|
2022-04-21 16:56:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message Server {
|
2022-05-23 14:37:52 +00:00
|
|
|
// id is the unique string identifying this server for all time.
|
|
|
|
string id = 1;
|
|
|
|
// address on the network of the server
|
|
|
|
string address = 2;
|
|
|
|
// the consul version of the server
|
|
|
|
string version = 3;
|
2022-04-21 16:56:18 +00:00
|
|
|
}
|