backends

package
v0.0.0-...-aaec902 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2022 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTtl

func GetTtl(mesg dns.Msg) time.Time

Types

type Memory

type Memory struct {
	Saver map[string]Record
	sync.RWMutex
}

func NewMemory

func NewMemory() (*Memory, error)

func (*Memory) Close

func (m *Memory) Close() error

func (*Memory) DeleteRecord

func (m *Memory) DeleteRecord(record Record) error

func (*Memory) GetRecord

func (m *Memory) GetRecord(name string) (Record, bool)

func (*Memory) SaveRecord

func (m *Memory) SaveRecord(record Record) error

func (*Memory) UpdateRecord

func (m *Memory) UpdateRecord(record Record) error

type Record

type Record struct {
	Name string    `json:"name"`
	Ttl  time.Time `json:"ttl"`
	Mesg *dns.Msg  `json:"mesg"`
}

func (*Record) Valid

func (r *Record) Valid() bool

Jump to

Keyboard shortcuts

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