dns_store

package
v0.0.0-...-6af2dc9 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DnsStore

type DnsStore struct {
	// contains filtered or unexported fields
}

func (*DnsStore) DeleteRecord

func (s *DnsStore) DeleteRecord(hostname string, ip string)

func (*DnsStore) ServeDNS

func (s *DnsStore) ServeDNS(w dns.ResponseWriter, r *dns.Msg)

func (*DnsStore) SetProxy

func (s *DnsStore) SetProxy(proxy string)

func (*DnsStore) Stop

func (s *DnsStore) Stop()

func (*DnsStore) StoreRecord

func (s *DnsStore) StoreRecord(hostname, ip string)

type MockDnsStore

type MockDnsStore struct {
	StopFunc         func()
	SetProxyFunc     func(proxy string)
	StoreRecordFunc  func(hostname, ip string)
	DeleteRecordFunc func(hostname string, ip string)
}

func (MockDnsStore) DeleteRecord

func (s MockDnsStore) DeleteRecord(hostname string, ip string)

func (MockDnsStore) SetProxy

func (s MockDnsStore) SetProxy(proxy string)

func (MockDnsStore) Stop

func (s MockDnsStore) Stop()

func (MockDnsStore) StoreRecord

func (s MockDnsStore) StoreRecord(hostname, ip string)

type Store

type Store interface {
	Stop()
	SetProxy(proxy string)
	StoreRecord(hostname, ip string)
	DeleteRecord(hostname string, ip string)
}

func New

func New(bind ...string) Store

Jump to

Keyboard shortcuts

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