Websocket 实时拉取

This commit is contained in:
奶爸
2019-12-10 17:57:57 +08:00
parent be57af065d
commit 3c39e1537d
11 changed files with 197 additions and 32 deletions

View File

@@ -10,6 +10,7 @@ type Config struct {
Debug bool
Site struct {
Brand string // 站点名称
Domain string // 站点域名
CookieName string // 浏览器 Cookie 名称
}
GitHub struct {

View File

@@ -68,7 +68,7 @@ type Host struct {
Arch string
Virtualization string
BootTime uint64
IP string
IP string `json:"-"`
CountryCode string
Version string
}

View File

@@ -1,5 +1,9 @@
package model
import (
pb "github.com/p14yground/nezha/proto"
)
// Server ..
type Server struct {
Common
@@ -8,4 +12,7 @@ type Server struct {
Host Host
State State
Stream pb.NezhaService_HeartbeatServer `gorm:"-" json:"-"`
StreamClose chan<- error `gorm:"-" json:"-"`
}