MCPcopy
hub / github.com/jeessy2/ddns-go / Init

Method Init

dns/aliesa.go:66–78  ·  view source on GitHub ↗

Init 初始化

(dnsConf *config.DnsConfig, ipv4cache *util.IpCache, ipv6cache *util.IpCache)

Source from the content-addressed store, hash-verified

64
65// Init 初始化
66func (ali *Aliesa) Init(dnsConf *config.DnsConfig, ipv4cache *util.IpCache, ipv6cache *util.IpCache) {
67 ali.Domains.Ipv4Cache = ipv4cache
68 ali.Domains.Ipv6Cache = ipv6cache
69 ali.DNS = dnsConf.DNS
70 ali.Domains.GetNewIp(dnsConf)
71 if dnsConf.TTL == "" {
72 // 默认600s
73 ali.TTL = "600"
74 } else {
75 ali.TTL = dnsConf.TTL
76 }
77 ali.httpClient = dnsConf.GetHTTPClient()
78}
79
80// AddUpdateDomainRecords 添加或更新IPv4/IPv6记录
81func (ali *Aliesa) AddUpdateDomainRecords() config.Domains {

Callers

nothing calls this directly

Calls 2

GetNewIpMethod · 0.80
GetHTTPClientMethod · 0.80

Tested by

no test coverage detected