Version: v0.2.6 Latest Latest

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

Go to latest
Published: Nov 18, 2016 License: MIT Imports: 13 Imported by: 10



Package ns provides name server methods for selected name server(s)



This section is empty.


This section is empty.


This section is empty.


type Host

type Host struct {
	IP      string
	Alpha2  string
	Country string
	City    string

A Host represents a name server host

type Request

type Request struct {
	Country      string
	City         string
	Target       string
	Type         uint16
	Host         string
	Hosts        []Host
	TraceEnabled bool

A Request represents a name server request

func NewRequest

func NewRequest() *Request

NewRequest creates a new dns request object

func (*Request) ChkCountry

func (d *Request) ChkCountry(country string) bool

ChkCountry validates and set requested country

func (*Request) ChkNode

func (d *Request) ChkNode(city string) bool

ChkNode set requested country

func (*Request) CountryList added in v0.1.8

func (d *Request) CountryList() []string

CountryList init the connect contry items

func (*Request) Dig

func (d *Request) Dig()

Dig looks up name server w/ trace feature

func (*Request) Init

func (d *Request) Init()

Init configure dns command and fetch name servers

func (*Request) Local added in v0.1.7

func (d *Request) Local()

Local set host to nothing means local

func (*Request) NodeList added in v0.1.8

func (d *Request) NodeList() []string

NodeList gets the node city items

func (*Request) RunDig added in v0.2.3

func (d *Request) RunDig()

RunDig looks up name server

func (*Request) RunDigTrace added in v0.2.3

func (d *Request) RunDigTrace()

RunDigTrace handles dig trace

func (*Request) SetOptions added in v0.2.3

func (d *Request) SetOptions(args, prompt string) bool

SetOptions passes arguments to appropriate variable

Source Files

Jump to

Keyboard shortcuts

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