Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HostResolver ¶
type HostResolver interface {
Subset() []corev1.EndpointSubset
}
HostResolver is used for getting endpoint subsets with resolved IPs.
type Provider ¶
type Provider interface { HasSynced() bool Start(ctx context.Context) WithCallback(onUpdate func()) HostResolver }
Provider allows to start and attach callbacks for a specific host resolution updates.
func CreateForCluster ¶
func CreateForCluster(client kubernetes.Interface, logger logrus.FieldLogger) (Provider, error)
CreateForCluster tries to use the hostname and port from the client to create the provider. If that fails, then tries to use the KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT environment variable. If that fails it fallbacks to NoOpProvider().
func NewNoOpProvider ¶
func NewNoOpProvider() Provider
func NewProvider ¶
NewProvider returns a Provider for a specific host and port with resync indicating how often the hostname resolution is happening.
Click to show internal directories.
Click to hide internal directories.