resolver

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2017 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GATEWAY = "gateway"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Record

type Record struct {
	ID          string  `json:"id"`
	Parent      string  `json:"parent"`
	IP          string  `json:"ip"`
	Port        string  `json:"port"`
	Weight      float64 `json:"weight"`
	ProxyRecord bool    `json:"proxy_record"`
	CleanName   string  `json:"clean_name"`
	// contains filtered or unexported fields
}

func (*Record) String

func (r *Record) String() string

type Resolver

type Resolver struct {
	sync.RWMutex // protect m
	// contains filtered or unexported fields
}

func NewResolver

func NewResolver(cfg *config.DNS, AdvertiseIP string) *Resolver

func (*Resolver) DelRecord

func (s *Resolver) DelRecord(c *gin.Context)

func (*Resolver) Forward

func (r *Resolver) Forward(req *dns.Msg) (reply *dns.Msg, err error)

func (*Resolver) GetRecord added in v0.2.3

func (s *Resolver) GetRecord(c *gin.Context)

func (*Resolver) ListRecords

func (s *Resolver) ListRecords(c *gin.Context)

func (*Resolver) ShowConfigs

func (s *Resolver) ShowConfigs(c *gin.Context)

func (*Resolver) ShowStats

func (s *Resolver) ShowStats(c *gin.Context)

func (*Resolver) Start

func (r *Resolver) Start() error

func (*Resolver) Upsert

func (r *Resolver) Upsert(record *Record) error

func (*Resolver) UpsertRecord

func (s *Resolver) UpsertRecord(c *gin.Context)

Jump to

Keyboard shortcuts

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