mirror of
https://github.com/bcicen/ctop.git
synced 2025-12-06 15:16:41 +08:00
refactor collectors into subpackage
This commit is contained in:
@@ -6,8 +6,8 @@ import (
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
"github.com/bcicen/ctop/connector/collector"
|
||||
"github.com/bcicen/ctop/container"
|
||||
"github.com/bcicen/ctop/metrics"
|
||||
api "github.com/fsouza/go-dockerclient"
|
||||
)
|
||||
|
||||
@@ -128,7 +128,7 @@ func (cm *Docker) MustGet(id string) *container.Container {
|
||||
// append container struct for new containers
|
||||
if !ok {
|
||||
// create collector
|
||||
collector := metrics.NewDocker(cm.client, id)
|
||||
collector := collector.NewDocker(cm.client, id)
|
||||
// create container
|
||||
c = container.New(id, collector)
|
||||
cm.lock.Lock()
|
||||
|
||||
Reference in New Issue
Block a user