dnscleaner

package
v0.0.0-...-a4b4531 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DNSAPI

type DNSAPI interface {
	RemoveDNSEntry(ctx context.Context, project, zone string, record *dns.ResourceRecordSet) error
	LookupDNSEntry(ctx context.Context, project, zone, name, address, recordType string, recordTTL int64) (*dns.ResourceRecordSet, error)
}

DNSAPI abstracts access to DNS API in GCP

type DNSAPIWrapper

type DNSAPIWrapper struct {
	Service *dns.Service
}

DNSAPIWrapper abstracts GCP DNS Service API

func (*DNSAPIWrapper) LookupDNSEntry

func (daw *DNSAPIWrapper) LookupDNSEntry(ctx context.Context, project, zone, name, address, recordType string, recordTTL int64) (*dns.ResourceRecordSet, error)

LookupDNSEntry delegates to DNS.Service.ResourceRecordSets.List(project, zone, name, address, recordType, recordTTL) function

func (*DNSAPIWrapper) RemoveDNSEntry

func (daw *DNSAPIWrapper) RemoveDNSEntry(ctx context.Context, project, zone string, record *dns.ResourceRecordSet) error

RemoveDNSEntry delegates to DNS.Service.Changes.Create(project, zone, *record) function

type DNSEntryRemover

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

DNSEntryRemover deletes IPs provisioned by gke-long-lasting prow jobs.

func New

func New(dnsAPI DNSAPI, maxAttempts, backoff uint, makeChanges bool) *DNSEntryRemover

New returns a new instance of dnsEntryRemover

func (*DNSEntryRemover) Run

func (der *DNSEntryRemover) Run(project, zone, dnsName, dnsAddress, recordType string, recordTTL int64) error

Run executes dns removal process for specified dns record-set

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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