rdns

package
v0.0.0-...-68a8344 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2020 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RDNSClient

type RDNSClient interface {
	Get(key string) ([]RDNSRecord, error)
	List(rootDomain string) ([]RDNSRecord, error)
	Set(value RDNSRecord) error
	Delete(key string) error
}

RDNSClient is an interface to work with Rancher DNS(RDNS) records in etcdv3 backend.

type RDNSConfig

type RDNSConfig struct {
	DryRun       bool
	DomainFilter endpoint.DomainFilter
	RootDomain   string
}

RDNSConfig contains configuration to create a new Rancher DNS(RDNS) provider.

type RDNSProvider

type RDNSProvider struct {
	provider.BaseProvider
	// contains filtered or unexported fields
}

RDNSProvider is an implementation of Provider for Rancher DNS(RDNS).

func NewRDNSProvider

func NewRDNSProvider(config RDNSConfig) (*RDNSProvider, error)

NewRDNSProvider initializes a new Rancher DNS(RDNS) based Provider.

func (RDNSProvider) ApplyChanges

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

ApplyChanges stores changes back to etcdv3 converting them to Rancher DNS(RDNS) format and aggregating A and TXT records.

func (RDNSProvider) Records

func (p RDNSProvider) Records(ctx context.Context) ([]*endpoint.Endpoint, error)

Records returns all DNS records found in Rancher DNS(RDNS) etcdv3 backend. Depending on the record fields it may be mapped to one or two records of type A, TXT, A+TXT.

type RDNSRecord

type RDNSRecord struct {
	AggregationHosts []string `json:"aggregation_hosts,omitempty"`
	Host             string   `json:"host,omitempty"`
	Text             string   `json:"text,omitempty"`
	TTL              uint32   `json:"ttl,omitempty"`
	Key              string   `json:"-"`
}

RDNSRecord represents Rancher DNS(RDNS) etcdv3 record.

type RDNSRecordType

type RDNSRecordType struct {
	Type   string `json:"type,omitempty"`
	Domain string `json:"domain,omitempty"`
}

RDNSRecordType represents Rancher DNS(RDNS) etcdv3 record type.

Jump to

Keyboard shortcuts

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