mirror of
https://github.com/bcicen/ctop.git
synced 2025-12-06 15:16:41 +08:00
add runc manager placeholder
This commit is contained in:
19
connector/manager/runc.go
Normal file
19
connector/manager/runc.go
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
package manager
|
||||||
|
|
||||||
|
type Runc struct{}
|
||||||
|
|
||||||
|
func NewRunc() *Runc {
|
||||||
|
return &Runc{}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rc *Runc) Start() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rc *Runc) Stop() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rc *Runc) Remove() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
@@ -11,6 +11,7 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/bcicen/ctop/connector/collector"
|
"github.com/bcicen/ctop/connector/collector"
|
||||||
|
"github.com/bcicen/ctop/connector/manager"
|
||||||
"github.com/bcicen/ctop/container"
|
"github.com/bcicen/ctop/container"
|
||||||
"github.com/opencontainers/runc/libcontainer"
|
"github.com/opencontainers/runc/libcontainer"
|
||||||
"github.com/opencontainers/runc/libcontainer/cgroups/systemd"
|
"github.com/opencontainers/runc/libcontainer/cgroups/systemd"
|
||||||
@@ -175,7 +176,8 @@ func (cm *Runc) MustGet(id string) *container.Container {
|
|||||||
collector := collector.NewRunc(libc)
|
collector := collector.NewRunc(libc)
|
||||||
|
|
||||||
// create container
|
// create container
|
||||||
c = container.New(id, collector)
|
manager := manager.NewRunc()
|
||||||
|
c = container.New(id, collector, manager)
|
||||||
|
|
||||||
name := libc.ID()
|
name := libc.ID()
|
||||||
// set initial metadata
|
// set initial metadata
|
||||||
|
|||||||
Reference in New Issue
Block a user