agent.proto 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. syntax = "proto3";
  2. import "github.com/gogo/protobuf/gogoproto/gogo.proto";
  3. package libnetwork;
  4. option (gogoproto.marshaler_all) = true;
  5. option (gogoproto.unmarshaler_all) = true;
  6. option (gogoproto.stringer_all) = true;
  7. option (gogoproto.gostring_all) = true;
  8. option (gogoproto.sizer_all) = true;
  9. option (gogoproto.goproto_stringer_all) = false;
  10. // EndpointRecord specifies all the endpoint specific information that
  11. // needs to gossiped to nodes participating in the network.
  12. message EndpointRecord {
  13. // Name of the container
  14. string name = 1;
  15. // Service name of the service to which this endpoint belongs.
  16. string service_name = 2;
  17. // Service ID of the service to which this endpoint belongs.
  18. string service_id = 3 [(gogoproto.customname) = "ServiceID"];
  19. // Virtual IP of the service to which this endpoint belongs.
  20. string virtual_ip = 4 [(gogoproto.customname) = "VirtualIP"];
  21. // IP assigned to this endpoint.
  22. string endpoint_ip = 5 [(gogoproto.customname) = "EndpointIP"];
  23. // IngressPorts exposed by the service to which this endpoint belongs.
  24. repeated PortConfig ingress_ports = 6;
  25. // A list of aliases which are alternate names for the service
  26. repeated string aliases = 7;
  27. // List of aliases task specific aliases
  28. repeated string task_aliases = 8;
  29. // Whether this enpoint's service has been disabled
  30. bool service_disabled = 9;
  31. }
  32. // PortConfig specifies an exposed port which can be
  33. // addressed using the given name. This can be later queried
  34. // using a service discovery api or a DNS SRV query. The node
  35. // port specifies a port that can be used to address this
  36. // service external to the cluster by sending a connection
  37. // request to this port to any node on the cluster.
  38. message PortConfig {
  39. enum Protocol {
  40. option (gogoproto.goproto_enum_prefix) = false;
  41. TCP = 0 [(gogoproto.enumvalue_customname) = "ProtocolTCP"];
  42. UDP = 1 [(gogoproto.enumvalue_customname) = "ProtocolUDP"];
  43. SCTP = 2 [(gogoproto.enumvalue_customname) = "ProtocolSCTP"];
  44. }
  45. // Name for the port. If provided the port information can
  46. // be queried using the name as in a DNS SRV query.
  47. string name = 1;
  48. // Protocol for the port which is exposed.
  49. Protocol protocol = 2;
  50. // The port which the application is exposing and is bound to.
  51. uint32 target_port = 3;
  52. // PublishedPort specifies the port on which the service is
  53. // exposed on all nodes on the cluster. If not specified an
  54. // arbitrary port in the node port range is allocated by the
  55. // system. If specified it should be within the node port
  56. // range and it should be available.
  57. uint32 published_port = 4;
  58. }