cleanup: Refactor BaseEndpointInfo to cache IP and Port values

This commit is contained in:
Junhao Zou
2023-10-28 00:09:44 +08:00
parent 9363edf07b
commit 7a91051caa
6 changed files with 265 additions and 252 deletions

View File

@@ -111,7 +111,7 @@ type Endpoint interface {
// IP returns IP part of the endpoint.
IP() string
// Port returns the Port part of the endpoint.
Port() (int, error)
Port() int
// IsLocal returns true if the endpoint is running on the same host as kube-proxy.
IsLocal() bool