dnsconfig

package
v0.0.0-...-7fa21a5 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2023 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TypeA  = "A"
	TypeLB = "LB"
)
View Source
const (
	DefaultSimultaneousConnections  = 16384
	DefaultMaxConnectionsPerAddress = 32768
)

Variables

This section is empty.

Functions

This section is empty.

Types

type A

type A struct {
	Addresses   []net.IP                   `record:"addresses"`
	TTL         uint32                     `record:"ttl,optional"`
	HealthCheck []*healthcheck.HealthCheck `record:"healthcheck,optional"`
}

func (*A) Convert

func (a *A) Convert(name string) []dns.RR

type LB

type LB struct {
	Listeners                []string                   `record:"listeners"`
	Kind                     string                     `record:"kind"`
	Backends                 []string                   `record:"backends"`
	SimultaneousConnections  int                        `record:"simultaneous_connections,optional"`
	MaxConnectionsPerAddress int                        `record:"max_connections_per_address,optional"`
	ConnectionTimeout        time.Duration              `record:"connection_timeout,optional"`
	TTL                      uint32                     `record:"ttl,optional"`
	TLS                      *TLSLB                     `record:"tls,optional"`
	HealthCheck              []*healthcheck.HealthCheck `record:"healthcheck,optional"`
}

func (*LB) Convert

func (lb *LB) Convert(name string) []dns.RR

type NS

type NS struct {
	Servers []string `record:"servers"`
	TTL     uint32   `record:"ttl,optional"`
}

func (*NS) Convert

func (ns *NS) Convert(name string) []dns.RR

type Record

type Record interface {
	Convert(string) []dns.RR
}

An attempt to normalize record management so it can be addressed in a generic way in the server. Convert() turns it into a []dns.RR in all cases, required for different record types to be implemented manually.

Honestly it kind of sucks, but no generics soooooo...

type SOA

type SOA struct {
	Domain  string `record:"domain"`
	Admin   string `record:"admin"`
	MinTTL  uint32 `record:"minttl"`
	Serial  uint32 `record:"serial"`
	Refresh uint32 `record:"refresh"`
	Retry   uint32 `record:"retry"`
	Expire  uint32 `record:"expire"`
}

func (*SOA) Convert

func (soa *SOA) Convert(name string) []dns.RR

type TLSLB

type TLSLB struct {
	CACertificate []byte `record:"ca_certificate,optional"`
	Certificate   []byte `record:"certificate"`
	Key           []byte `record:"key"`
}

Jump to

Keyboard shortcuts

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