mirror of
https://github.com/bcicen/ctop.git
synced 2025-12-06 15:16:41 +08:00
add StreamLogs() to collector interface
This commit is contained in:
@@ -4,10 +4,19 @@ import (
|
||||
"math"
|
||||
|
||||
"github.com/bcicen/ctop/logging"
|
||||
"github.com/bcicen/ctop/models"
|
||||
)
|
||||
|
||||
var log = logging.Init()
|
||||
|
||||
type Collector interface {
|
||||
Stream() chan models.Metrics
|
||||
StreamLogs() (chan string, error)
|
||||
Running() bool
|
||||
Start()
|
||||
Stop()
|
||||
}
|
||||
|
||||
func round(num float64) int {
|
||||
return int(num + math.Copysign(0.5, num))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user