🎨 improve offline server detect

This commit is contained in:
naiba
2020-10-24 21:29:05 +08:00
parent 7143089dcb
commit 4ad8a7e61a
9 changed files with 242 additions and 87 deletions

View File

@@ -1,6 +1,8 @@
package model
import (
"time"
pb "github.com/p14yground/nezha/proto"
)
@@ -10,8 +12,9 @@ type Server struct {
Name string
Secret string
Host *Host
State *State
Host *Host
State *State
LastActive time.Time
Stream pb.NezhaService_HeartbeatServer `gorm:"-" json:"-"`
StreamClose chan<- error `gorm:"-" json:"-"`