agent.proto 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. syntax = "proto3";
  2. import "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 endpoint
  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. }
  30. // PortConfig specifies an exposed port which can be
  31. // addressed using the given name. This can be later queried
  32. // using a service discovery api or a DNS SRV query. The node
  33. // port specifies a port that can be used to address this
  34. // service external to the cluster by sending a connection
  35. // request to this port to any node on the cluster.
  36. message PortConfig {
  37. enum Protocol {
  38. option (gogoproto.goproto_enum_prefix) = false;
  39. TCP = 0 [(gogoproto.enumvalue_customname) = "ProtocolTCP"];
  40. UDP = 1 [(gogoproto.enumvalue_customname) = "ProtocolUDP"];
  41. }
  42. // Name for the port. If provided the port information can
  43. // be queried using the name as in a DNS SRV query.
  44. string name = 1;
  45. // Protocol for the port which is exposed.
  46. Protocol protocol = 2;
  47. // The port which the application is exposing and is bound to.
  48. uint32 target_port = 3;
  49. // PublishedPort specifies the port on which the service is
  50. // exposed on all nodes on the cluster. If not specified an
  51. // arbitrary port in the node port range is allocated by the
  52. // system. If specified it should be within the node port
  53. // range and it should be available.
  54. uint32 published_port = 4;
  55. }