func (info *BaseServiceInfo) OnlyNodeLocalEndpoints() bool {
	return info.onlyNodeLocalEndpoints
}
OnlyNodeLocalEndpoints is part of ServicePort interface.
package proxy
import (
	"fmt"
	"net"
	"github.com/sbezverk/nfproxy/pkg/nftables"
	"k8s.io/klog"
	v1 "k8s.io/api/core/v1"
	"k8s.io/apimachinery/pkg/types"
	apiservice "k8s.io/kubernetes/pkg/api/v1/service"
)
type BaseServiceInfo struct {
	svcName                  string
	svcNamespace             string
	ipFamily                 v1.IPFamily
	clusterIP                net.IP
	port                     int
	protocol                 v1.Protocol
	nodePort                 int
	loadBalancerStatus       v1.LoadBalancerStatus
	sessionAffinityType      v1.ServiceAffinity
	stickyMaxAgeSeconds      int
	externalIPs              []string
	loadBalancerSourceRanges []string
	healthCheckNodePort      int
	onlyNodeLocalEndpoints   bool
	topologyKeys             []string
	svcnft                   *nftables.SVCnft
}
var _ ServicePort = &BaseServiceInfo{}
func (info *BaseServiceInfo) String() string {
	return fmt.Sprintf("%s:%s:%d/%s", info.ipFamily, info.clusterIP, info.port, info.protocol)
}
func (info *BaseServiceInfo) ClusterIP() net.IP {
	return info.clusterIP
}
func (info *BaseServiceInfo) Port() int {
	return info.port
}
func (info *BaseServiceInfo) SessionAffinityType() v1.ServiceAffinity {
	return info.sessionAffinityType
}
func (info *BaseServiceInfo) StickyMaxAgeSeconds() int {
	return info.stickyMaxAgeSeconds
}
func (info *BaseServiceInfo) Protocol() v1.Protocol {
	return info.protocol
}
func (info *BaseServiceInfo) LoadBalancerSourceRanges() []string {
	return info.loadBalancerSourceRanges
}
func (info *BaseServiceInfo) HealthCheckNodePort() int {
	return info.healthCheckNodePort
}
func (info *BaseServiceInfo) NodePort() int {
	return info.nodePort
}
func (info *BaseServiceInfo) ExternalIPStrings() []string {
	return info.externalIPs
}
func (info *BaseServiceInfo) LoadBalancerIPStrings() []string {
	var ips []string
	for _, ing := range info.loadBalancerStatus.Ingress {
		ips = append(ips, ing.IP)
	}
	return ips
}