record_set

package
v1.0.0-beta Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2017 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReverseAddr

func ReverseAddr(addr string) (arpa string, err error)

Taken somewhat from stdlib dnsclient.go

Types

type RecordSet

type RecordSet struct {
	// contains filtered or unexported fields
}

func Create

func Create(store RecordStore) (rs *RecordSet)

func (*RecordSet) Del

func (r *RecordSet) Del(dnsType uint16, host string)

func (*RecordSet) DelAddr

func (r *RecordSet) DelAddr(dnsType uint16, host, addr string)

func (*RecordSet) Get

func (r *RecordSet) Get(dnsType uint16, host string) (addr string)

func (*RecordSet) Put

func (r *RecordSet) Put(dnsType uint16, host, addr string)

type RecordStore

type RecordStore interface {
	PutVal(dnsType uint16, key, val string) error        // Put a single key/value type into store.
	GetAll(dnsType uint16, key string) ([]string, error) // Get all key values
	DelKey(dnsType uint16, key string) error             // Deletes key and all values for a
	DelVal(dnsType uint16, key, value string) error      // Deletes a single value from a key. Deletes key ifthere are no more values
	Clear() error                                        // Clear all keys from set
}

Key/value store used for dns records. keys are unique, but each key has a list of values

type RrIndexes

type RrIndexes struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func (*RrIndexes) Del

func (rri *RrIndexes) Del(dnsType uint16, key string)

func (*RrIndexes) NextVal

func (rri *RrIndexes) NextVal(dnsType uint16, key string, vals []string) (val string)

Jump to

Keyboard shortcuts

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