DNSPod和Alidns记录信息增加缓存

This commit is contained in:
GoEdgeLab
2022-10-20 21:47:21 +08:00
parent 5fc0cd688b
commit f5a62b80de
19 changed files with 474 additions and 26 deletions

View File

@@ -17,3 +17,26 @@ type Record struct {
Route string `json:"route"`
TTL int32 `json:"ttl"`
}
func (this *Record) Clone() *Record {
return &Record{
Id: this.Id,
Name: this.Name,
Type: this.Type,
Value: this.Value,
Route: this.Route,
TTL: this.TTL,
}
}
func (this *Record) Copy(anotherRecord *Record) {
if anotherRecord == nil {
return
}
this.Id = anotherRecord.Id
this.Name = anotherRecord.Name
this.Type = anotherRecord.Type
this.Value = anotherRecord.Value
this.Route = anotherRecord.Route
this.TTL = anotherRecord.TTL
}