Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ServiceResolverCell = cell.Module( "service-resolver", "Service DNS names to ClusterIP translator", cell.Provide(newServiceResolver), )
ServiceResolverCell provides a ServiceResolver instance to map DNS names matching Kubernetes services to the corresponding ClusterIP address, backed by a lazy resource.Store, which is only started on first access.
Functions ¶
func NewContextDialer ¶
func NewContextDialer(log logrus.FieldLogger, resolvers ...Resolver) dialContextFn
NewContextDialer returns a custom dialer associated with a set of resolvers, that map the target hostname into the corresponding IP address (or a possible alias DNS name). The dialer eventually calls (&net.Dialer{}).DialContext with the first successfully translated address, or the original one otherwise.
func ServiceURLToNamespacedName ¶
func ServiceURLToNamespacedName(host string) (types.NamespacedName, error)
Types ¶
type ServiceResolver ¶
type ServiceResolver struct {
// contains filtered or unexported fields
}
ServiceResolver maps DNS names matching Kubernetes services to the corresponding ClusterIP address.
Click to show internal directories.
Click to hide internal directories.