controller

package
v0.1.0-alpha Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Config struct {
	EnableIPv6     bool
	IPExpiration   time.Duration
	MaxRequeueTime uint32
	DNS            *dns.ClientConfig
	DNSProtocol    string
	DNSEnvironment string
}

Functions

This section is empty.

Types

type DNSResolverReconciler

type DNSResolverReconciler struct {
	client.Client
	Scheme *runtime.Scheme
}

func (*DNSResolverReconciler) Reconcile

func (r *DNSResolverReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile makes sure that each DNSResolver has an associated IPMap. It gets triggered by changes in DNSResolvers

func (*DNSResolverReconciler) SetupWithManager

func (r *DNSResolverReconciler) SetupWithManager(mgr ctrl.Manager) error

type IPCacheT

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

IPCache keeps track of when an IP that is no longer seen should be removed from an IPMap

var IPCache IPCacheT

func (*IPCacheT) CleanUp

func (cache *IPCacheT) CleanUp(name types.NamespacedName)

Remove expired IPs from cache

func (*IPCacheT) Delete

func (cache *IPCacheT) Delete(name types.NamespacedName, ip string)

func (*IPCacheT) Get

func (cache *IPCacheT) Get(name types.NamespacedName, ip string) time.Time

Return the expiration time for an IPMap and IP if it exists, the zero time if not

func (*IPCacheT) NameExists

func (cache *IPCacheT) NameExists(name types.NamespacedName) bool

func (*IPCacheT) Set

func (cache *IPCacheT) Set(name types.NamespacedName, ip string, expires time.Time)

Jump to

Keyboard shortcuts

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