Updated import and comments
This commit is contained in:
parent
808fd821ac
commit
e038729d67
@ -62,7 +62,7 @@ func main() {
|
|||||||
glog.Errorf("Docker registration failed: %v.", err)
|
glog.Errorf("Docker registration failed: %v.", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Register the raw driver.
|
// Register the lxc driver.
|
||||||
if err := lxc.Register(containerManager); err != nil {
|
if err := lxc.Register(containerManager); err != nil {
|
||||||
glog.Fatalf("lxc registration failed: %v.", err)
|
glog.Fatalf("lxc registration failed: %v.", err)
|
||||||
}
|
}
|
||||||
|
@ -17,11 +17,11 @@ package lxc
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"strings"
|
||||||
"github.com/docker/libcontainer/cgroups"
|
"github.com/docker/libcontainer/cgroups"
|
||||||
"github.com/golang/glog"
|
"github.com/golang/glog"
|
||||||
"github.com/google/cadvisor/container"
|
"github.com/google/cadvisor/container"
|
||||||
"github.com/google/cadvisor/info"
|
"github.com/google/cadvisor/info"
|
||||||
"strings"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type cgroupSubsystems struct {
|
type cgroupSubsystems struct {
|
||||||
@ -47,7 +47,7 @@ func (self *lxcFactory) NewContainerHandler(name string) (container.ContainerHan
|
|||||||
return newLxcContainerHandler(name, self.cgroupSubsystems, self.machineInfoFactory)
|
return newLxcContainerHandler(name, self.cgroupSubsystems, self.machineInfoFactory)
|
||||||
}
|
}
|
||||||
|
|
||||||
// The raw factory can handle any container.
|
// The lxc factory can handle any container.
|
||||||
func (self *lxcFactory) CanHandle(name string) (bool, error) {
|
func (self *lxcFactory) CanHandle(name string) (bool, error) {
|
||||||
if name == "/lxc" {
|
if name == "/lxc" {
|
||||||
return true, nil
|
return true, nil
|
||||||
|
@ -20,6 +20,10 @@ import (
|
|||||||
"code.google.com/p/go.exp/inotify"
|
"code.google.com/p/go.exp/inotify"
|
||||||
"flag"
|
"flag"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"io/ioutil"
|
||||||
|
"path"
|
||||||
|
"strconv"
|
||||||
|
"strings"
|
||||||
dockerlibcontainer "github.com/docker/libcontainer"
|
dockerlibcontainer "github.com/docker/libcontainer"
|
||||||
"github.com/docker/libcontainer/cgroups"
|
"github.com/docker/libcontainer/cgroups"
|
||||||
cgroup_fs "github.com/docker/libcontainer/cgroups/fs"
|
cgroup_fs "github.com/docker/libcontainer/cgroups/fs"
|
||||||
@ -30,10 +34,6 @@ import (
|
|||||||
"github.com/google/cadvisor/fs"
|
"github.com/google/cadvisor/fs"
|
||||||
"github.com/google/cadvisor/info"
|
"github.com/google/cadvisor/info"
|
||||||
"github.com/google/cadvisor/utils"
|
"github.com/google/cadvisor/utils"
|
||||||
"io/ioutil"
|
|
||||||
"path"
|
|
||||||
"strconv"
|
|
||||||
"strings"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var containersDesc = flag.String("cDesc", "/etc/docker/cdesc.json", "container description file")
|
var containersDesc = flag.String("cDesc", "/etc/docker/cdesc.json", "container description file")
|
||||||
|
Loading…
Reference in New Issue
Block a user