2019-12-08 23:18:29 +08:00
|
|
|
package model
|
|
|
|
|
2019-12-10 17:57:57 +08:00
|
|
|
import (
|
2020-10-24 21:29:05 +08:00
|
|
|
"time"
|
|
|
|
|
2020-11-11 10:07:45 +08:00
|
|
|
pb "github.com/naiba/nezha/proto"
|
2019-12-10 17:57:57 +08:00
|
|
|
)
|
|
|
|
|
2019-12-08 23:18:29 +08:00
|
|
|
// Server ..
|
|
|
|
type Server struct {
|
|
|
|
Common
|
|
|
|
Name string
|
2020-12-07 20:47:13 +08:00
|
|
|
Secret string `json:"-"`
|
2019-12-09 18:14:31 +08:00
|
|
|
|
2020-10-24 21:29:05 +08:00
|
|
|
Host *Host
|
|
|
|
State *State
|
|
|
|
LastActive time.Time
|
2019-12-10 17:57:57 +08:00
|
|
|
|
|
|
|
Stream pb.NezhaService_HeartbeatServer `gorm:"-" json:"-"`
|
|
|
|
StreamClose chan<- error `gorm:"-" json:"-"`
|
2019-12-08 23:18:29 +08:00
|
|
|
}
|