Versions in this module Expand all Collapse all v1 v1.0.0 Feb 10, 2023 Changes in this version + var AlreadyAssignedErr = fmt.Errorf("managed host already assigned") + var NoSuchHost = errors.New("no such host") + func IsNoSuchHostError(err error) bool + type DefaultHostResolver struct + Client dns.Client + func NewDefaultHostResolver() *DefaultHostResolver + func (hr *DefaultHostResolver) LookupIPAddr(ctx context.Context, host string) ([]HostAddress, error) + type FakeProvider struct + func (_ *FakeProvider) Delete(record *v1.DNSRecord, zone v1.DNSZone) error + func (_ *FakeProvider) Ensure(record *v1.DNSRecord, zone v1.DNSZone) error + type HostAddress struct + Host string + IP gonet.IP + TTL time.Duration + TXT string + type HostResolver interface + LookupIPAddr func(ctx context.Context, host string) ([]HostAddress, error) + type Provider interface + Delete func(record *v1.DNSRecord, zone v1.DNSZone) error + Ensure func(record *v1.DNSRecord, zone v1.DNSZone) error + func DNSProvider(dnsProviderName string) (Provider, error) + type SafeHostResolver struct + func NewSafeHostResolver(inner HostResolver) *SafeHostResolver + func (r *SafeHostResolver) LookupIPAddr(ctx context.Context, host string) ([]HostAddress, error) + type Service struct + func NewService(controlClient client.Client, hostResolv HostResolver, defaultCtrlNS string) *Service + func (s *Service) AddEndPoints(ctx context.Context, traffic traffic.Interface) error + func (s *Service) EnsureManagedHost(ctx context.Context, t traffic.Interface) ([]string, []*v1.DNSRecord, error) + func (s *Service) GetDNSRecords(ctx context.Context, traffic traffic.Interface) ([]*v1.DNSRecord, error) + func (s *Service) RegisterHost(ctx context.Context, h string, id string, zone v1.DNSZone) (*v1.DNSRecord, error) + func (s *Service) RemoveEndpoints(ctx context.Context, t traffic.Interface) error