dns

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2021 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const VIPListenPort = uint32(80)

Variables

This section is empty.

Functions

func DnsNameToKumaCompliant

func DnsNameToKumaCompliant(name string) (string, error)

func ForwardLookup

func ForwardLookup(vips vips.List, service string) (string, error)

func IsAddressAlreadyAllocated

func IsAddressAlreadyAllocated(err error) bool

func Setup

func Setup(rt runtime.Runtime) error

func UpdateMeshedVIPs

func UpdateMeshedVIPs(global, meshed vips.List, ipam IPAM, serviceSet ServiceSet) (updated bool, errs error)

func VIPOutbounds

func VIPOutbounds(
	resourceKey model.ResourceKey,
	dataplanes []*core_mesh.DataplaneResource,
	zoneIngresses []*core_mesh.ZoneIngressResource,
	vips vips.List,
	externalServices []*core_mesh.ExternalServiceResource,
) []*mesh_proto.Dataplane_Networking_Outbound

Types

type DNSServer

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

func NewDNSServer

func NewDNSServer(port uint32, resolver resolver.DNSResolver, metrics core_metrics.Metrics, modifier NameModifier) (DNSServer, error)

type IPAM

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

func NewSimpleIPAM

func NewSimpleIPAM(cidr string) (IPAM, error)

type NameModifier

type NameModifier = func(qName string) (string, error)

type ServiceSet

type ServiceSet map[string]bool

func BuildServiceSet

func BuildServiceSet(rm manager.ReadOnlyResourceManager, mesh string) (ServiceSet, error)

func (ServiceSet) ToArray

func (s ServiceSet) ToArray() (services []string)

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

func (*SimpleIPAM) ReserveIP

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

type VIPsAllocator

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

func NewVIPsAllocator

func NewVIPsAllocator(rm manager.ReadOnlyResourceManager, configManager config_manager.ConfigManager, cidr string, resolver resolver.DNSResolver) (*VIPsAllocator, error)

NewVIPsAllocator creates new object of VIPsAllocator. You can either call method CreateOrUpdateVIPConfig manually or start VIPsAllocator as a component. In the latter scenario it will call CreateOrUpdateVIPConfig every 'tickInterval' for all meshes in the store.

func (*VIPsAllocator) CreateOrUpdateVIPConfig

func (d *VIPsAllocator) CreateOrUpdateVIPConfig(mesh string) error

func (*VIPsAllocator) CreateOrUpdateVIPConfigs

func (d *VIPsAllocator) CreateOrUpdateVIPConfigs() error

func (*VIPsAllocator) NeedLeaderElection

func (d *VIPsAllocator) NeedLeaderElection() bool

func (*VIPsAllocator) Start

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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