Documentation ¶
Index ¶
- Constants
- func IsDomainNotExist(err error) bool
- func NsLookup(domain string, qtype uint16, net, dnsServerAddr string) (*dns.Msg, error)
- func ReadCache(domain string, qtype uint16, ttl int64) []dns.RR
- func SetupDnsServer(dnsHandler dns.Handler, port int, net string) error
- func WriteCache(domain string, qtype uint16, answer []dns.RR, timestamp int64)
- type DomainNotExistError
- type NsEntry
Constants ¶
View Source
const ( // Localhost ip of localhost Localhost = "127.0.0.1" // YyyyMmDdHhMmSs timestamp format YyyyMmDdHhMmSs = "2006-01-02 15:04:05" // StandardSshPort standard ssh port StandardSshPort = 22 // StandardDnsPort standard dns port StandardDnsPort = 53 // EnvVarLocalDomains environment variable for local domain config EnvVarLocalDomains = "KT_LOCAL_DOMAIN" // EnvVarDnsProtocol environment variable for shadow pod dns protocol EnvVarDnsProtocol = "KT_DNS_PROTOCOL" // EnvVarLogLevel environment variable for shadow pod log level EnvVarLogLevel = "KT_LOG_LEVEL" )
Variables ¶
This section is empty.
Functions ¶
func IsDomainNotExist ¶ added in v0.3.0
IsDomainNotExist check the error type
func NsLookup ¶ added in v0.3.0
NsLookup query domain record, dnsServerAddr use '<ip>:<port>' format
func SetupDnsServer ¶ added in v0.3.0
SetupDnsServer start dns server on specified port
Types ¶
type DomainNotExistError ¶ added in v0.3.0
type DomainNotExistError struct {
// contains filtered or unexported fields
}
DomainNotExistError ...
func (DomainNotExistError) Error ¶ added in v0.3.0
func (e DomainNotExistError) Error() string
Click to show internal directories.
Click to hide internal directories.