model

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Model

type Model struct {
	sync.Mutex
	Origin   string
	TTL      int64
	Zonefile string
	Header   []dns.RR
	Records  []Record
}

func FromZonefile

func FromZonefile(zonefile, origin string, ttl int64) (*Model, error)

FromZonefile initializes a new data model with a zonefile backend.

func (*Model) Flush

func (model *Model) Flush() error

func (*Model) Refresh

func (model *Model) Refresh() error

Refresh fetches the current state from disk.

func (*Model) Update

func (model *Model) Update(records []Record)

type Record

type Record struct {
	Type string
	Name string
	Data string
}

func (Record) String

func (record Record) String() string

Jump to

Keyboard shortcuts

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