Documentation ¶
Index ¶
- Variables
- func IsNoSuchHostError(err error) bool
- type DefaultHostResolver
- type FakeProvider
- type HostAddress
- type HostResolver
- type Provider
- type SafeHostResolver
- type 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
Constants ¶
This section is empty.
Variables ¶
View Source
var AlreadyAssignedErr = fmt.Errorf("managed host already assigned")
View Source
var (
NoSuchHost = errors.New("no such host")
)
Functions ¶
func IsNoSuchHostError ¶
Types ¶
type DefaultHostResolver ¶
func NewDefaultHostResolver ¶
func NewDefaultHostResolver() *DefaultHostResolver
func (*DefaultHostResolver) LookupIPAddr ¶
func (hr *DefaultHostResolver) LookupIPAddr(ctx context.Context, host string) ([]HostAddress, error)
type HostResolver ¶
type HostResolver interface {
LookupIPAddr(ctx context.Context, host string) ([]HostAddress, error)
}
type Provider ¶
type Provider interface { // Ensure will create or update record. Ensure(record *v1.DNSRecord, zone v1.DNSZone) error // Delete will delete record. Delete(record *v1.DNSRecord, zone v1.DNSZone) error }
Provider knows how to manage DNS zones only as pertains to routing.
func DNSProvider ¶
type SafeHostResolver ¶
type SafeHostResolver struct { HostResolver // contains filtered or unexported fields }
func NewSafeHostResolver ¶
func NewSafeHostResolver(inner HostResolver) *SafeHostResolver
func (*SafeHostResolver) LookupIPAddr ¶
func (r *SafeHostResolver) LookupIPAddr(ctx context.Context, host string) ([]HostAddress, error)
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(controlClient client.Client, hostResolv HostResolver, defaultCtrlNS string) *Service
func (*Service) AddEndPoints ¶
func (*Service) EnsureManagedHost ¶
func (s *Service) EnsureManagedHost(ctx context.Context, t traffic.Interface) ([]string, []*v1.DNSRecord, error)
EnsureManagedHost will ensure there is at least one managed host for rthe traffic object and return those host and dnsrecords
func (*Service) GetDNSRecords ¶
func (*Service) RegisterHost ¶
Click to show internal directories.
Click to hide internal directories.