2016-05-17 17:12:39 -04:00
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
import "gogoproto/gogo.proto";
|
|
|
|
|
|
|
|
package libnetwork;
|
|
|
|
|
|
|
|
option (gogoproto.marshaler_all) = true;
|
|
|
|
option (gogoproto.unmarshaler_all) = true;
|
|
|
|
option (gogoproto.stringer_all) = true;
|
|
|
|
option (gogoproto.gostring_all) = true;
|
|
|
|
option (gogoproto.sizer_all) = true;
|
|
|
|
option (gogoproto.goproto_stringer_all) = false;
|
|
|
|
|
2016-05-31 02:55:51 -04:00
|
|
|
// EndpointRecord specifies all the endpoint specific information that
|
|
|
|
// needs to gossiped to nodes participating in the network.
|
2016-05-17 17:12:39 -04:00
|
|
|
message EndpointRecord {
|
2016-05-31 02:55:51 -04:00
|
|
|
// Name of the endpoint
|
2016-05-17 17:12:39 -04:00
|
|
|
string name = 1;
|
2016-05-31 02:55:51 -04:00
|
|
|
|
|
|
|
// Service name of the service to which this endpoint belongs.
|
2016-05-17 17:12:39 -04:00
|
|
|
string service_name = 2;
|
2016-05-31 02:55:51 -04:00
|
|
|
|
|
|
|
// Service ID of the service to which this endpoint belongs.
|
2016-05-17 17:12:39 -04:00
|
|
|
string service_id = 3 [(gogoproto.customname) = "ServiceID"];
|
2016-05-31 02:55:51 -04:00
|
|
|
|
|
|
|
// Virtual IP of the service to which this endpoint belongs.
|
2016-05-25 01:46:18 -04:00
|
|
|
string virtual_ip = 4 [(gogoproto.customname) = "VirtualIP"];
|
2016-05-31 02:55:51 -04:00
|
|
|
|
|
|
|
// IP assigned to this endpoint.
|
2016-05-25 01:46:18 -04:00
|
|
|
string endpoint_ip = 5 [(gogoproto.customname) = "EndpointIP"];
|
2016-05-31 02:55:51 -04:00
|
|
|
|
|
|
|
// IngressPorts exposed by the service to which this endpoint belongs.
|
|
|
|
repeated PortConfig ingress_ports = 6;
|
2016-06-14 19:40:54 -04:00
|
|
|
|
|
|
|
// A list of aliases which are alternate names for the service
|
|
|
|
repeated string aliases = 7;
|
2016-08-02 23:28:33 -04:00
|
|
|
|
|
|
|
// List of aliases task specific aliases
|
|
|
|
repeated string task_aliases = 8;
|
2016-05-31 02:55:51 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
// PortConfig specifies an exposed port which can be
|
|
|
|
// addressed using the given name. This can be later queried
|
|
|
|
// using a service discovery api or a DNS SRV query. The node
|
|
|
|
// port specifies a port that can be used to address this
|
|
|
|
// service external to the cluster by sending a connection
|
|
|
|
// request to this port to any node on the cluster.
|
|
|
|
message PortConfig {
|
|
|
|
enum Protocol {
|
|
|
|
option (gogoproto.goproto_enum_prefix) = false;
|
|
|
|
|
|
|
|
TCP = 0 [(gogoproto.enumvalue_customname) = "ProtocolTCP"];
|
|
|
|
UDP = 1 [(gogoproto.enumvalue_customname) = "ProtocolUDP"];
|
|
|
|
}
|
|
|
|
|
|
|
|
// Name for the port. If provided the port information can
|
|
|
|
// be queried using the name as in a DNS SRV query.
|
|
|
|
string name = 1;
|
|
|
|
|
|
|
|
// Protocol for the port which is exposed.
|
|
|
|
Protocol protocol = 2;
|
|
|
|
|
|
|
|
// The port which the application is exposing and is bound to.
|
2016-06-13 17:11:18 -04:00
|
|
|
uint32 target_port = 3;
|
2016-05-31 02:55:51 -04:00
|
|
|
|
2016-06-13 17:11:18 -04:00
|
|
|
// PublishedPort specifies the port on which the service is
|
2016-05-31 02:55:51 -04:00
|
|
|
// exposed on all nodes on the cluster. If not specified an
|
|
|
|
// arbitrary port in the node port range is allocated by the
|
|
|
|
// system. If specified it should be within the node port
|
|
|
|
// range and it should be available.
|
2016-06-13 17:11:18 -04:00
|
|
|
uint32 published_port = 4;
|
2016-05-31 02:55:51 -04:00
|
|
|
}
|