Have both connect and disconnect time in the status API
This commit is contained in:
parent
a297e33eff
commit
8878ca1e88
@ -19,6 +19,8 @@ func GetStatus() models.Status {
|
|||||||
ViewerCount: len(_stats.Clients),
|
ViewerCount: len(_stats.Clients),
|
||||||
OverallMaxViewerCount: _stats.OverallMaxViewerCount,
|
OverallMaxViewerCount: _stats.OverallMaxViewerCount,
|
||||||
SessionMaxViewerCount: _stats.SessionMaxViewerCount,
|
SessionMaxViewerCount: _stats.SessionMaxViewerCount,
|
||||||
|
LastDisconnectTime: _stats.LastDisconnectTime,
|
||||||
|
LastConnectTime: _stats.LastConnectTime,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,9 +1,16 @@
|
|||||||
package models
|
package models
|
||||||
|
|
||||||
|
import (
|
||||||
|
"time"
|
||||||
|
)
|
||||||
|
|
||||||
//Status represents the status of the system
|
//Status represents the status of the system
|
||||||
type Status struct {
|
type Status struct {
|
||||||
Online bool `json:"online"`
|
Online bool `json:"online"`
|
||||||
ViewerCount int `json:"viewerCount"`
|
ViewerCount int `json:"viewerCount"`
|
||||||
OverallMaxViewerCount int `json:"overallMaxViewerCount"`
|
OverallMaxViewerCount int `json:"overallMaxViewerCount"`
|
||||||
SessionMaxViewerCount int `json:"sessionMaxViewerCount"`
|
SessionMaxViewerCount int `json:"sessionMaxViewerCount"`
|
||||||
|
|
||||||
|
LastConnectTime time.Time `json:"lastConnectTime"`
|
||||||
|
LastDisconnectTime time.Time `json:"lastDisconnectTime"`
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user