storage

package
v0.0.0-...-7987c1a Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// TTL is the default Time To Live in seconds for authoritative responses
	TTL uint32 = 10

	// Master represents a master (Authoritative) record
	Master uint16 = iota
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BoltDB

type BoltDB struct {
	Filename string
	// contains filtered or unexported fields
}

BoltDB implements the Storage interface

func (*BoltDB) DelRRSet

func (db *BoltDB) DelRRSet(rrtype uint16, fqdn []byte) error

DelRRSet removes a RR set for a given FQDN and resource type

func (*BoltDB) GetRRSet

func (db *BoltDB) GetRRSet(name string, rrtype uint16) (*[]dns.RR, error)

GetRRSet returns all resources records for an FQDN and resource type

func (*BoltDB) SetHostRRSet

func (db *BoltDB) SetHostRRSet(rrtype uint16,
	fqdn []byte, addrs [][]byte) error

SetHostRRSet creates a resource record

func (*BoltDB) Start

func (db *BoltDB) Start() error

Start will open the DB file for IO

func (*BoltDB) Stop

func (db *BoltDB) Stop() error

Stop will close the DB file from IO

Jump to

Keyboard shortcuts

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