Documentation ¶
Index ¶
Constants ¶
View Source
const ( // RecordTypeAlias is unusual: the controller will try to resolve the target locally RecordTypeAlias = "_alias" RecordTypeA = "A" RecordTypeCNAME = "CNAME" )
Variables ¶
This section is empty.
Functions ¶
func EnsureDotSuffix ¶
Types ¶
type Context ¶
type Context interface { // CreateScope creates a new scope, which holds a set of records. // MarkReady must be called on every scope before any changes will be applied. // Records from all the scopes will be merged CreateScope(name string) (Scope, error) }
Context represents a state of the world for DNS. It is grouped by scopes & named keys, and controllers will replace those groups The DNS controller will then merge all those record sets, resolve aliases etc, and then call into a dns backend to match the desired state of the world.
type DNSController ¶
DNSController applies the desired DNS state to the DNS backend
func NewDNSController ¶
func NewDNSController(provider dnsprovider.Interface) (*DNSController, error)
NewDnsController creates a DnsController
func (*DNSController) CreateScope ¶
func (c *DNSController) CreateScope(scopeName string) (Scope, error)
CreateScope creates a scope object.
type DNSControllerScope ¶
type DNSControllerScope struct { // ScopeName is the string id for this scope ScopeName string // Ready is set if the populating controller has performed an initial synchronization of records Ready bool // Records is the map of actual records for this scope Records map[string][]Record // contains filtered or unexported fields }
scope is a group of record objects
func (*DNSControllerScope) MarkReady ¶
func (s *DNSControllerScope) MarkReady()
func (*DNSControllerScope) Replace ¶
func (s *DNSControllerScope) Replace(recordName string, records []Record)
type Record ¶
type Record struct { RecordType RecordType FQDN string Value string // If AliasTarget is set, this entry will not actually be set in DNS, // but will be used as an expansion for Records with type=RecordTypeAlias, // where the referring record has Value = our FQDN AliasTarget bool }
type RecordType ¶
type RecordType string
Click to show internal directories.
Click to hide internal directories.