- 新增 ClientInstance 模型,记录客户端 IP 与配置项的关联 - 配置拉取接口(fetchAll/fetchChanged)自动记录客户端信息 - 配置列表页面展示每个配置的在线客户端数量 - 点击可查看具体 IP 地址、拉取方式、最后拉取时间 - 超过 5 分钟未拉取的记录自动清理 - 注释掉 /api/ping 接口
16 lines
622 B
Go
16 lines
622 B
Go
package model
|
|
|
|
import "time"
|
|
|
|
type ClientInstance struct {
|
|
Id int `xorm:"int autoincr pk" json:"id"`
|
|
AppConfigId int `xorm:"int index" json:"appConfigId"`
|
|
AppName string `xorm:"varchar(64) index" json:"appName"`
|
|
Env string `xorm:"varchar(32)" json:"env"`
|
|
IP string `xorm:"varchar(64)" json:"ip"`
|
|
LastFetchAt *time.Time `xorm:"datetime" json:"lastFetchAt"`
|
|
LastFetchType string `xorm:"varchar(16)" json:"lastFetchType"`
|
|
CreatedAt *time.Time `xorm:"datetime" json:"createdAt"`
|
|
UpdatedAt *time.Time `xorm:"datetime" json:"updatedAt"`
|
|
}
|