1fd02a13c2
* Install `buf` instead of `protoc` * Created `buf.yaml` and `buf.gen.yaml` files in the two proto directories to control how `buf` generates/lints proto code. * Invoke `buf` instead of `protoc` * Added a `proto-format` make target. * Committed the reformatted proto files. * Added a `proto-lint` make target. * Integrated proto linting with CI * Fixed tons of proto linter warnings. * Got rid of deprecated builtin protoc-gen-go grpc plugin usage. Moved to direct usage of protoc-gen-go-grpc. * Unified all proto directories / go packages around using pb prefixes but ensuring all proto packages do not have the prefix.
35 lines
1.1 KiB
Protocol Buffer
35 lines
1.1 KiB
Protocol Buffer
// Package serverdiscovery provides a service on Consul servers to discover the set of servers
|
|
// currently able to handle incoming requests.
|
|
|
|
syntax = "proto3";
|
|
|
|
package serverdiscovery;
|
|
|
|
service ServerDiscoveryService {
|
|
// 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.
|
|
rpc WatchServers(WatchServersRequest) returns (stream WatchServersResponse) {}
|
|
}
|
|
|
|
message WatchServersRequest {
|
|
// 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;
|
|
}
|
|
|
|
message WatchServersResponse {
|
|
// Servers is the list of server address information.
|
|
repeated Server servers = 1;
|
|
}
|
|
|
|
message Server {
|
|
// 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;
|
|
}
|