db

package
v0.0.0-...-d0df754 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2017 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect(dbPath string) error

Connect create a bucket

func DeleteRecord

func DeleteRecord(key string) (err error)

DeleteRecord create a bucket

func Disconnect

func Disconnect() error

Disconnect create a bucket

func GetExpiredRecords

func GetExpiredRecords() ([]string, error)

GetExpiredRecords return a list of records in the database

func StoreRecord

func StoreRecord(key string, record Record) error

StoreRecord save a new record

Types

type Record

type Record struct {
	RR      string
	Expires int64
	ID      string
}

Record store a DNS record with metadata

func GetRecord

func GetRecord(key string) (r Record, err error)

GetRecord return a stored record for a domain

func NewRecord

func NewRecord(rr string, expires int64) Record

NewRecord create a new record

Jump to

Keyboard shortcuts

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