Documentation
¶
Overview ¶
Package mx provides a DNS MX record type for use with connect tunnels.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Record ¶
type Record struct {
// Priority is the MX preference value.
Priority uint16 `json:"priority" mapstructure:"priority"`
// Host is a Go template string for the mail exchange FQDN (must end in ".").
// Empty defaults to "{{.Domain}}." at render time — the tunnel's own FQDN.
Host string `json:"host,omitempty" mapstructure:"host"`
// Prefix is the DNS owner label relative to the base domain. "" = apex.
Prefix string `json:"prefix,omitempty" mapstructure:"prefix"`
// TTL is the DNS TTL in seconds advertised to resolvers. Zero uses dns.DefaultTTL.
TTL uint32 `json:"ttl,omitempty" mapstructure:"ttl"`
}
Record is a DNS MX record following the same Render pattern as dmarc.Record and spf.Record: fields may contain Go template strings expanded at render time.
func (*Record) RecordPrefix ¶
RecordPrefix returns the DNS owner label prefix relative to the base domain, e.g. "sub." or "" for the apex.
func (*Record) RecordTTL ¶
RecordTTL returns the TTL to use for this record, falling back to dns.DefaultTTL.
func (*Record) RecordType ¶
RecordType returns the DNS record type string, "MX".
func (*Record) RecordValue ¶
RecordValue returns the wire-ready MX record value, "<priority> <host>".
Click to show internal directories.
Click to hide internal directories.