dns

package
v0.0.124 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2025 License: GPL-3.0 Imports: 13 Imported by: 2

Documentation

Index

Constants

View Source
const ADD_RECORD = 0x1
View Source
const REMOVE_RECORD = 0x2

Variables

This section is empty.

Functions

func ParseQuery

func ParseQuery(cache *Records, m *dns.Msg) error

Types

type ARecord

type ARecord struct {
	IPs []string
}

func NewARecord added in v0.0.69

func NewARecord() *ARecord

func (*ARecord) Append added in v0.0.69

func (AR *ARecord) Append(ip string)

func (*ARecord) Remove added in v0.0.69

func (AR *ARecord) Remove(ip string) error

type Distributed added in v0.0.119

type Distributed struct {
	Domain string
	IP     string
	Action uint8
}

type Records

type Records struct {
	ARecords map[string]*ARecord
	Agent    string
	Client   *client.Http
	User     *authentication.User
	Updates  chan distributed.KV
}

func New

func New(agent string, client *client.Http, user *authentication.User) *Records

func (*Records) AddARecord

func (r *Records) AddARecord(domain string, ip string) error

func (*Records) Find

func (r *Records) Find(domain string) []string

func (*Records) ListenUpdates added in v0.0.119

func (r *Records) ListenUpdates()

func (*Records) Local added in v0.0.119

func (r *Records) Local(domain string, bytes []byte) error

func (*Records) Propose added in v0.0.119

func (r *Records) Propose(domain string, ip string, action uint8) error

func (*Records) RemoveARecord

func (r *Records) RemoveARecord(domain string, ip string) error

Jump to

Keyboard shortcuts

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