fix comments in pkg/proxy/types.go

This commit is contained in:
lokichoggio 2022-06-24 09:50:02 +08:00
parent 487512bb56
commit 52280de403
No known key found for this signature in database
GPG Key ID: FD002179654B1B4F

View File

@ -63,25 +63,25 @@ func fmtPortName(in string) string {
type ServicePort interface { type ServicePort interface {
// String returns service string. An example format can be: `IP:Port/Protocol`. // String returns service string. An example format can be: `IP:Port/Protocol`.
String() string String() string
// GetClusterIP returns service cluster IP in net.IP format. // ClusterIP returns service cluster IP in net.IP format.
ClusterIP() net.IP ClusterIP() net.IP
// GetPort returns service port if present. If return 0 means not present. // Port returns service port if present. If return 0 means not present.
Port() int Port() int
// GetSessionAffinityType returns service session affinity type // SessionAffinityType returns service session affinity type
SessionAffinityType() v1.ServiceAffinity SessionAffinityType() v1.ServiceAffinity
// GetStickyMaxAgeSeconds returns service max connection age // StickyMaxAgeSeconds returns service max connection age
StickyMaxAgeSeconds() int StickyMaxAgeSeconds() int
// ExternalIPStrings returns service ExternalIPs as a string array. // ExternalIPStrings returns service ExternalIPs as a string array.
ExternalIPStrings() []string ExternalIPStrings() []string
// LoadBalancerIPStrings returns service LoadBalancerIPs as a string array. // LoadBalancerIPStrings returns service LoadBalancerIPs as a string array.
LoadBalancerIPStrings() []string LoadBalancerIPStrings() []string
// GetProtocol returns service protocol. // Protocol returns service protocol.
Protocol() v1.Protocol Protocol() v1.Protocol
// LoadBalancerSourceRanges returns service LoadBalancerSourceRanges if present empty array if not // LoadBalancerSourceRanges returns service LoadBalancerSourceRanges if present empty array if not
LoadBalancerSourceRanges() []string LoadBalancerSourceRanges() []string
// GetHealthCheckNodePort returns service health check node port if present. If return 0, it means not present. // HealthCheckNodePort returns service health check node port if present. If return 0, it means not present.
HealthCheckNodePort() int HealthCheckNodePort() int
// GetNodePort returns a service Node port if present. If return 0, it means not present. // NodePort returns a service Node port if present. If return 0, it means not present.
NodePort() int NodePort() int
// ExternalPolicyLocal returns if a service has only node local endpoints for external traffic. // ExternalPolicyLocal returns if a service has only node local endpoints for external traffic.
ExternalPolicyLocal() bool ExternalPolicyLocal() bool
@ -119,12 +119,12 @@ type Endpoint interface {
// This is only set when watching EndpointSlices. If using Endpoints, this is always // This is only set when watching EndpointSlices. If using Endpoints, this is always
// true since only ready endpoints are read from Endpoints. // true since only ready endpoints are read from Endpoints.
IsServing() bool IsServing() bool
// IsTerminating retruns true if an endpoint is terminating. For pods, // IsTerminating returns true if an endpoint is terminating. For pods,
// that is any pod with a deletion timestamp. // that is any pod with a deletion timestamp.
// This is only set when watching EndpointSlices. If using Endpoints, this is always // This is only set when watching EndpointSlices. If using Endpoints, this is always
// false since terminating endpoints are always excluded from Endpoints. // false since terminating endpoints are always excluded from Endpoints.
IsTerminating() bool IsTerminating() bool
// GetZoneHint returns the zone hint for the endpoint. This is based on // GetZoneHints returns the zone hint for the endpoint. This is based on
// endpoint.hints.forZones[0].name in the EndpointSlice API. // endpoint.hints.forZones[0].name in the EndpointSlice API.
GetZoneHints() sets.String GetZoneHints() sets.String
// IP returns IP part of the endpoint. // IP returns IP part of the endpoint.