Implement multi-port Endpoints

This is a part of multi-port services.
This commit is contained in:
Tim Hockin
2015-02-21 01:05:18 -08:00
parent e0fd83096c
commit 160f288832
33 changed files with 755 additions and 387 deletions

View File

@@ -750,9 +750,6 @@ type Endpoints struct {
TypeMeta `json:",inline"`
ObjectMeta `json:"metadata,omitempty"`
// Optional: The IP protocol for these endpoints. Supports "TCP" and
// "UDP". Defaults to "TCP".
Protocol Protocol `json:"protocol,omitempty"`
Endpoints []Endpoint `json:"endpoints,omitempty"`
}
@@ -762,8 +759,21 @@ type Endpoint struct {
// TODO: This should allow hostname or IP, see #4447.
IP string `json:"ip"`
// Required: The destination port to access.
Port int `json:"port"`
// The ports exposed on this IP.
Ports []EndpointPort
}
type EndpointPort struct {
// Optional if only one port is defined in this Endpoint.
// The name of this port within the larger service/endpoint structure.
// This must be a DNS_LABEL.
Name string
// The IP protocol for this port. Supports "TCP" and "UDP".
Protocol Protocol
// The destination port to access.
Port int
}
// EndpointsList is a list of endpoints.