🎨 improve offline server detect

This commit is contained in:
naiba committed 2020-10-24 21:29:05 +08:00
1 parent 024a11bcd0
commit f2c304e396
9 files changed
+242 -87

No files matched your search

-1
View File
@@ -12,7 +12,6 @@ type Config struct {
Debug bool
Site struct {
Brand string // 站点名称
Domain string // 站点域名
CookieName string // 浏览器 Cookie 名称
}
GitHub struct {
+5 -2
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:"-"`