mirror of
https://github.com/luscis/openlan.git
synced 2025-10-16 14:00:42 +08:00
fea: add statics for output
This commit is contained in:
19
pkg/models/output.go
Executable file
19
pkg/models/output.go
Executable file
@@ -0,0 +1,19 @@
|
||||
package models
|
||||
|
||||
import "time"
|
||||
|
||||
type Output struct {
|
||||
Network string
|
||||
Protocol string
|
||||
Connection string
|
||||
Vlan int
|
||||
Device string
|
||||
RxBytes uint64
|
||||
TxBytes uint64
|
||||
ErrPkt uint64
|
||||
NewTime int64
|
||||
}
|
||||
|
||||
func (o *Output) UpTime() int64 {
|
||||
return time.Now().Unix() - o.NewTime
|
||||
}
|
Reference in New Issue
Block a user