mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-02-04 04:30:05 +00:00
report geoip separately, fix server creation & deletion bugs (#14)
* new geoip method * report geoip separately, fix server creation & deletion bugs * fix struct tag * fix write name * remove deleteion list * remove rpc realip header * Revert "remove rpc realip header" This reverts commit 8a5f86cf2d7df87f28cfa2a3b3430f449dd6ed73.
This commit is contained in:
@@ -27,6 +27,7 @@ type Server struct {
|
||||
|
||||
Host *Host `gorm:"-" json:"host,omitempty"`
|
||||
State *HostState `gorm:"-" json:"state,omitempty"`
|
||||
GeoIP *GeoIP `gorm:"-" json:"geoip,omitempty"`
|
||||
LastActive time.Time `gorm:"-" json:"last_active,omitempty"`
|
||||
|
||||
TaskClose chan error `gorm:"-" json:"-"`
|
||||
@@ -40,6 +41,7 @@ type Server struct {
|
||||
func (s *Server) CopyFromRunningServer(old *Server) {
|
||||
s.Host = old.Host
|
||||
s.State = old.State
|
||||
s.GeoIP = old.GeoIP
|
||||
s.LastActive = old.LastActive
|
||||
s.TaskClose = old.TaskClose
|
||||
s.TaskCloseLock = old.TaskCloseLock
|
||||
|
||||
Reference in New Issue
Block a user