provider

package
v0.0.0-...-80131f2 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyChanges

func ApplyChanges(ctx context.Context, cf cf.Cloudflare, changes []Change) error

func BatchUpdateDNSRecords

func BatchUpdateDNSRecords(ctx context.Context, cf cf.Cloudflare, changes []Change) error

Types

type Change

type Change struct {
	Action    ChangeType
	ZoneID    string
	RecordID  string
	Name      string
	TunnelURI string
	Service   string
}

func TunnelDNSChangeSet

func TunnelDNSChangeSet(tunnelID string, rules []cloudflare.UnvalidatedIngressRule, zoneMap ZoneMap) []Change

type ChangeType

type ChangeType string
const (
	ChangeTypeNoop   ChangeType = "NOOP"
	ChangeTypeCreate ChangeType = "CREATE"
	ChangeTypeUpdate ChangeType = "UPDATE"
	ChangeTypeDelete ChangeType = "DELETE"
)

type CloudflareTunnelProvider

type CloudflareTunnelProvider struct {
	Cloudflare          cf.Cloudflare
	CloudflareAccountID string
	CloudflareTunnelID  string
	DryRun              bool
	DomainFilter        []string
}

func (CloudflareTunnelProvider) AdjustEndpoints

func (CloudflareTunnelProvider) AdjustEndpoints(endpoints []*endpoint.Endpoint) ([]*endpoint.Endpoint, error)

AdjustEndpoints adjusts a given set of endpoints

required to satisfy the external-dns provider interface

func (CloudflareTunnelProvider) ApplyChanges

func (p CloudflareTunnelProvider) ApplyChanges(ctx context.Context, changes *plan.Changes) error

ApplyChanges applies a given set of changes

required to satisfy the external-dns provider interface

func (CloudflareTunnelProvider) GetDomainFilter

func (p CloudflareTunnelProvider) GetDomainFilter() endpoint.DomainFilter

func (CloudflareTunnelProvider) Records

Records returns the list of live DNS records

required to satisfy the external-dns provider interface

type Rules

type Rules []cloudflare.UnvalidatedIngressRule

func (*Rules) ApplyChanges

func (r *Rules) ApplyChanges(changes *plan.Changes) error

func (*Rules) CreateRule

func (r *Rules) CreateRule(hostname, service string) error

func (*Rules) DeleteRule

func (r *Rules) DeleteRule(hostname string) error

func (*Rules) UpdateRule

func (r *Rules) UpdateRule(hostname, service string) error

type ZoneDetail

type ZoneDetail struct {
	Zone    cloudflare.Zone
	Records map[string]cloudflare.DNSRecord
}

type ZoneMap

type ZoneMap map[string]ZoneDetail

func GenerateZoneMap

func GenerateZoneMap(ctx context.Context, cf cf.Cloudflare) (*ZoneMap, error)

func (ZoneMap) GetMatchingZone

func (z ZoneMap) GetMatchingZone(hostname string) *ZoneDetail

GetMatchingZone finds the longest matching zone for the hostname

func (ZoneMap) GetRecordByName

func (z ZoneMap) GetRecordByName(hostname string) *cloudflare.DNSRecord

GetRecordByName finds a record by name in the zone map

Jump to

Keyboard shortcuts

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