Documentation ¶
Overview ¶
Package plankton is a CoreDNS plugin that prints "plankton" to stdout on every packet received.
It serves as an plankton CoreDNS plugin with numerous code comments.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AAAA_Record ¶
type AAAA_Record struct { Seq int `json:"seq,omitempty"` Ttl uint32 `json:"ttl,omitempty"` Ip net.IP `json:"ip"` GslbW uint32 `json:"gslbw,omitempty"` Location uint32 `json:"location,omitempty"` HashId string `json:"hashid,omitempty"` }
AAAA_Record struct for IPv6 addresses
type A_Record ¶
type A_Record struct { Seq int `json:"seq,omitempty"` Ttl uint32 `json:"ttl,omitempty"` Ip net.IP `json:"ip"` GslbW uint32 `json:"gslbw,omitempty"` Location uint32 `json:"location,omitempty"` HashId string `json:"hashid,omitempty"` }
A_Record type record struct for ipv4
type CAA_Record ¶
type CAA_Record struct { Seq int `json:"seq,omitempty"` Ttl uint32 `json:"ttl,omitempty"` Flag uint8 `json:"flag"` Tag string `json:"tag"` Value string `json:"value"` GslbW uint32 `json:"gslbw,omitempty"` Location uint32 `json:"location,omitempty"` HashId string `json:"hashid,omitempty"` }
CAA_Record struct
type CNAME_Record ¶
type CNAME_Record struct { Seq int `json:"seq,omitempty"` Ttl uint32 `json:"ttl,omitempty"` Host string `json:"host"` GslbW uint32 `json:"gslbw,omitempty"` Location uint32 `json:"location,omitempty"` HashId string `json:"hashid,omitempty"` }
CNAME_Record struct
type HashItem ¶
type HashItem struct { HashId string `json:"hashid,omitempty"` //Str string `json:"str,omitempty"` Count int `json:"count,omitempty"` Enabled bool `json:"enabled,omitempty"` }
Hash Item
type MX_Record ¶
type MX_Record struct { Seq int `json:"seq,omitempty"` Ttl uint32 `json:"ttl,omitempty"` Host string `json:"host"` Preference uint16 `json:"preference"` GslbW uint32 `json:"gslbw,omitempty"` Location uint32 `json:"location,omitempty"` HashId string `json:"hashid,omitempty"` }
MX_Record struct
type NS_Record ¶
type NS_Record struct { Seq int `json:"seq,omitempty"` Ttl uint32 `json:"ttl,omitempty"` Host string `json:"host"` GslbW uint32 `json:"gslbw,omitempty"` Location uint32 `json:"location,omitempty"` HashId string `json:"hashid,omitempty"` }
NS_Record struct
type Plankton ¶
type Plankton struct { Next plugin.Handler Pool *redis.Pool Path string Zone Zone Ttl uint32 LastZoneUpdate time.Time MaxRespRec int // contains filtered or unexported fields }
Plankton is an plankton plugin to show how to write a plugin. Redis struct policy types:
1 = round-robin, 2 = ordered 3 = geolocation
func (*Plankton) LoadZoneFromFile ¶
type Record ¶
type Record struct { Policy int `json:"policy,omitempty"` StickyTTL int `json:"stickyttl,omitempty"` A []A_Record `json:"a,omitempty"` AAAA []AAAA_Record `json:"aaaa,omitempty"` TXT []TXT_Record `json:"txt,omitempty"` CNAME []CNAME_Record `json:"cname,omitempty"` NS []NS_Record `json:"ns,omitempty"` MX []MX_Record `json:"mx,omitempty"` SRV []SRV_Record `json:"srv,omitempty"` CAA []CAA_Record `json:"caa,omitempty"` SOA []SOA_Record `json:"soa,omitempty"` }
Record Struct with all types
type ResponsePrinter ¶
type ResponsePrinter struct {
dns.ResponseWriter
}
ResponsePrinter wrap a dns.ResponseWriter and will write plankton to standard output when WriteMsg is called.
func NewResponsePrinter ¶
func NewResponsePrinter(w dns.ResponseWriter) *ResponsePrinter
NewResponsePrinter returns ResponseWriter.
type SOA_Record ¶
type SOA_Record struct { Seq int `json:"seq,omitempty"` Ttl uint32 `json:"ttl,omitempty"` Ns string `json:"ns"` MBox string `json:"MBox"` Refresh uint32 `json:"refresh"` Retry uint32 `json:"retry"` Expire uint32 `json:"expire"` MinTtl uint32 `json:"minttl"` GslbW uint32 `json:"gslbw,omitempty"` Location uint32 `json:"location,omitempty"` HashId string `json:"hashid,omitempty"` }
SOA_Record struct
type SRV_Record ¶
type SRV_Record struct { Seq int `json:"seq,omitempty"` Ttl uint32 `json:"ttl,omitempty"` Priority uint16 `json:"priority"` Weight uint16 `json:"weight"` Port uint16 `json:"port"` Target string `json:"target"` GslbW uint32 `json:"gslbw,omitempty"` Location uint32 `json:"location,omitempty"` HashId string `json:"hashid,omitempty"` }
SRV_Record struct