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 ¶
NewContextDialer returns a custom dialer associated with a set of resolvers, that map the provided address/port pair according to the implemented strategy. The dialer eventually calls (&net.Dialer{}).DialContext on the address/port pair returned by the sequential execution of all provided resolvers.
func ServiceBackendResolverFactory ¶ added in v1.18.1
func ServiceBackendResolverFactory(ignoredInitializers ...string) func(db *statedb.DB, fes statedb.Table[*loadbalancer.Frontend]) *ServiceBackendResolver
func ServiceURLToNamespacedName ¶
func ServiceURLToNamespacedName(host string) (types.NamespacedName, error)
Types ¶
type Resolver ¶
type Resolver interface {
// Resolve maps the provided host and port, according to the implemented strategy
// (e.g., DNS resolution, service load-balancing, ...). The original host and port
// must be returned in case no mapping can be found.
Resolve(ctx context.Context, host, port string) (string, string)
}
type ServiceBackendResolver ¶ added in v1.18.1
type ServiceBackendResolver struct {
// contains filtered or unexported fields
}
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.