ns

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2016 License: MIT Imports: 11 Imported by: 13

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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
	Host    string
	Hosts   []Host
}

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(args string)

Dig look up name server

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

Jump to

Keyboard shortcuts

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