add StreamLogs() to collector interface

This commit is contained in:
Bradley Cicenas
2017-06-27 16:21:16 +00:00
parent 2d284d9277
commit 240345d527
6 changed files with 65 additions and 9 deletions

View File

@@ -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))
}