dns

package
v0.0.0-...-7b34d14 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 7, 2020 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DNSPersistence

type DNSPersistence struct {
	// contains filtered or unexported fields
}

func NewDNSPersistence

func NewDNSPersistence(manager config_manager.ConfigManager) *DNSPersistence

func (*DNSPersistence) Get

func (p *DNSPersistence) Get() (VIPList, error)

func (*DNSPersistence) Set

func (p *DNSPersistence) Set(viplist VIPList) error

type DNSResolver

type DNSResolver interface {
	GetDomain() string
	SetVIPs(list VIPList)

	ForwardLookup(service string) (string, error)
	ForwardLookupFQDN(name string) (string, error)
	ReverseLookup(ip string) (string, error)
}

func NewDNSResolver

func NewDNSResolver(domain string) DNSResolver

type DNSServer

type DNSServer interface {
	Start(<-chan struct{}) error
	NeedLeaderElection() bool
}

func NewDNSServer

func NewDNSServer(port uint32, resolver DNSResolver) DNSServer

type IPAM

type IPAM interface {
	AllocateIP() (string, error)
	FreeIP(ip string) error
}

func NewSimpleIPAM

func NewSimpleIPAM(cidr string) (IPAM, error)

type SimpleDNSServer

type SimpleDNSServer struct {
	// contains filtered or unexported fields
}

func (*SimpleDNSServer) NeedLeaderElection

func (d *SimpleDNSServer) NeedLeaderElection() bool

func (*SimpleDNSServer) Start

func (d *SimpleDNSServer) Start(stop <-chan struct{}) error

type SimpleIPAM

type SimpleIPAM struct {
	ipam.IPAM
}

func (*SimpleIPAM) AllocateIP

func (i *SimpleIPAM) AllocateIP() (string, error)

func (*SimpleIPAM) FreeIP

func (i *SimpleIPAM) FreeIP(ip string) error

type VIPList

type VIPList map[string]string

type VIPsAllocator

type VIPsAllocator interface {
	Start(<-chan struct{}) error
	NeedLeaderElection() bool
}

VIPsAllocator takes service tags in dataplanes and allocate VIP for every unique service. It is only run by CP leader.

func NewVIPsAllocator

func NewVIPsAllocator(rm manager.ReadOnlyResourceManager, persistence *DNSPersistence, ipam IPAM, resolver DNSResolver) (VIPsAllocator, error)

type VIPsSynchronizer

type VIPsSynchronizer interface {
	Start(<-chan struct{}) error
	NeedLeaderElection() bool
}

VIPsSynchronizer takes allocated VIPs by VIPsAllocator and updates DNSResolver.

func NewVIPsSynchronizer

func NewVIPsSynchronizer(rm manager.ReadOnlyResourceManager, resolver DNSResolver, persistence *DNSPersistence, leadInfo component.LeaderInfo) (VIPsSynchronizer, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL