Merge pull request #558 from rjnagal/version
Bulk move current info api to info/v1. Making room for info/v2.
This commit is contained in:
commit
98d368e7ac
@ -29,7 +29,7 @@ import (
|
||||
|
||||
"github.com/golang/glog"
|
||||
"github.com/google/cadvisor/events"
|
||||
"github.com/google/cadvisor/info"
|
||||
info "github.com/google/cadvisor/info/v1"
|
||||
"github.com/google/cadvisor/manager"
|
||||
)
|
||||
|
||||
|
@ -20,7 +20,7 @@ import (
|
||||
|
||||
"github.com/golang/glog"
|
||||
"github.com/google/cadvisor/events"
|
||||
"github.com/google/cadvisor/info"
|
||||
info "github.com/google/cadvisor/info/v1"
|
||||
"github.com/google/cadvisor/manager"
|
||||
)
|
||||
|
||||
|
@ -28,12 +28,12 @@ import (
|
||||
"github.com/golang/glog"
|
||||
"github.com/google/cadvisor/api"
|
||||
"github.com/google/cadvisor/healthz"
|
||||
"github.com/google/cadvisor/info"
|
||||
"github.com/google/cadvisor/manager"
|
||||
"github.com/google/cadvisor/pages"
|
||||
"github.com/google/cadvisor/pages/static"
|
||||
"github.com/google/cadvisor/utils/sysfs"
|
||||
"github.com/google/cadvisor/validate"
|
||||
"github.com/google/cadvisor/version"
|
||||
)
|
||||
|
||||
var argIp = flag.String("listen_ip", "", "IP to listen on, defaults to all IPs")
|
||||
@ -53,7 +53,7 @@ func main() {
|
||||
flag.Parse()
|
||||
|
||||
if *versionFlag {
|
||||
fmt.Printf("cAdvisor version %s\n", info.VERSION)
|
||||
fmt.Printf("cAdvisor version %s\n", version.VERSION)
|
||||
os.Exit(0)
|
||||
}
|
||||
|
||||
@ -135,7 +135,7 @@ func main() {
|
||||
// Install signal handler.
|
||||
installSignalHandler(containerManager)
|
||||
|
||||
glog.Infof("Starting cAdvisor version: %q on port %d", info.VERSION, *argPort)
|
||||
glog.Infof("Starting cAdvisor version: %q on port %d", version.VERSION, *argPort)
|
||||
|
||||
addr := fmt.Sprintf("%s:%d", *argIp, *argPort)
|
||||
glog.Fatal(http.ListenAndServe(addr, nil))
|
||||
|
@ -24,7 +24,7 @@ import (
|
||||
"path"
|
||||
"strings"
|
||||
|
||||
"github.com/google/cadvisor/info"
|
||||
info "github.com/google/cadvisor/info/v1"
|
||||
)
|
||||
|
||||
// Client represents the base URL for a cAdvisor client.
|
||||
|
@ -25,8 +25,8 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/google/cadvisor/info"
|
||||
itest "github.com/google/cadvisor/info/test"
|
||||
info "github.com/google/cadvisor/info/v1"
|
||||
itest "github.com/google/cadvisor/info/v1/test"
|
||||
"github.com/kr/pretty"
|
||||
)
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
// defines an interface for container operation handlers.
|
||||
package container
|
||||
|
||||
import "github.com/google/cadvisor/info"
|
||||
import info "github.com/google/cadvisor/info/v1"
|
||||
|
||||
// ListType describes whether listing should be just for a
|
||||
// specific container or performed recursively.
|
||||
|
@ -28,7 +28,7 @@ import (
|
||||
"github.com/golang/glog"
|
||||
"github.com/google/cadvisor/container"
|
||||
"github.com/google/cadvisor/container/libcontainer"
|
||||
"github.com/google/cadvisor/info"
|
||||
info "github.com/google/cadvisor/info/v1"
|
||||
"github.com/google/cadvisor/utils"
|
||||
)
|
||||
|
||||
|
@ -32,7 +32,7 @@ import (
|
||||
"github.com/google/cadvisor/container"
|
||||
containerLibcontainer "github.com/google/cadvisor/container/libcontainer"
|
||||
"github.com/google/cadvisor/fs"
|
||||
"github.com/google/cadvisor/info"
|
||||
info "github.com/google/cadvisor/info/v1"
|
||||
"github.com/google/cadvisor/utils"
|
||||
)
|
||||
|
||||
|
@ -22,7 +22,7 @@ import (
|
||||
"github.com/docker/libcontainer/cgroups"
|
||||
cgroupfs "github.com/docker/libcontainer/cgroups/fs"
|
||||
"github.com/docker/libcontainer/network"
|
||||
"github.com/google/cadvisor/info"
|
||||
info "github.com/google/cadvisor/info/v1"
|
||||
)
|
||||
|
||||
type CgroupSubsystems struct {
|
||||
|
@ -15,7 +15,7 @@
|
||||
package container
|
||||
|
||||
import (
|
||||
"github.com/google/cadvisor/info"
|
||||
info "github.com/google/cadvisor/info/v1"
|
||||
"github.com/stretchr/testify/mock"
|
||||
)
|
||||
|
||||
|
@ -20,7 +20,7 @@ import (
|
||||
"github.com/golang/glog"
|
||||
"github.com/google/cadvisor/container"
|
||||
"github.com/google/cadvisor/container/libcontainer"
|
||||
"github.com/google/cadvisor/info"
|
||||
info "github.com/google/cadvisor/info/v1"
|
||||
)
|
||||
|
||||
type rawFactory struct {
|
||||
|
@ -33,7 +33,7 @@ import (
|
||||
"github.com/google/cadvisor/container"
|
||||
"github.com/google/cadvisor/container/libcontainer"
|
||||
"github.com/google/cadvisor/fs"
|
||||
"github.com/google/cadvisor/info"
|
||||
info "github.com/google/cadvisor/info/v1"
|
||||
"github.com/google/cadvisor/utils"
|
||||
"github.com/google/cadvisor/utils/sysinfo"
|
||||
)
|
||||
|
@ -12,7 +12,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package info
|
||||
package v1
|
||||
|
||||
import (
|
||||
"reflect"
|
@ -12,7 +12,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package info
|
||||
package v1
|
||||
|
||||
import (
|
||||
"testing"
|
@ -12,7 +12,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package info
|
||||
package v1
|
||||
|
||||
type FsInfo struct {
|
||||
// Block device associated with the filesystem.
|
@ -19,7 +19,7 @@ import (
|
||||
"math/rand"
|
||||
"time"
|
||||
|
||||
"github.com/google/cadvisor/info"
|
||||
info "github.com/google/cadvisor/info/v1"
|
||||
)
|
||||
|
||||
func GenerateRandomStats(numStats, numCores int, duration time.Duration) []*info.ContainerStats {
|
@ -21,7 +21,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/google/cadvisor/info"
|
||||
info "github.com/google/cadvisor/info/v1"
|
||||
"github.com/google/cadvisor/integration/framework"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
@ -18,7 +18,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/google/cadvisor/info"
|
||||
info "github.com/google/cadvisor/info/v1"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
|
@ -25,7 +25,7 @@ import (
|
||||
"github.com/docker/docker/pkg/units"
|
||||
"github.com/golang/glog"
|
||||
"github.com/google/cadvisor/container"
|
||||
"github.com/google/cadvisor/info"
|
||||
info "github.com/google/cadvisor/info/v1"
|
||||
"github.com/google/cadvisor/storage/memory"
|
||||
"github.com/google/cadvisor/summary"
|
||||
"github.com/google/cadvisor/utils/cpuload"
|
||||
|
@ -23,8 +23,8 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/google/cadvisor/container"
|
||||
"github.com/google/cadvisor/info"
|
||||
itest "github.com/google/cadvisor/info/test"
|
||||
info "github.com/google/cadvisor/info/v1"
|
||||
itest "github.com/google/cadvisor/info/v1/test"
|
||||
"github.com/google/cadvisor/storage/memory"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
@ -26,10 +26,11 @@ import (
|
||||
dclient "github.com/fsouza/go-dockerclient"
|
||||
"github.com/google/cadvisor/container/docker"
|
||||
"github.com/google/cadvisor/fs"
|
||||
"github.com/google/cadvisor/info"
|
||||
info "github.com/google/cadvisor/info/v1"
|
||||
"github.com/google/cadvisor/utils"
|
||||
"github.com/google/cadvisor/utils/sysfs"
|
||||
"github.com/google/cadvisor/utils/sysinfo"
|
||||
version "github.com/google/cadvisor/version"
|
||||
)
|
||||
|
||||
var cpuRegExp = regexp.MustCompile("processor\\t*: +([0-9]+)")
|
||||
@ -272,7 +273,7 @@ func getVersionInfo() (*info.VersionInfo, error) {
|
||||
KernelVersion: kernel_version,
|
||||
ContainerOsVersion: container_os,
|
||||
DockerVersion: docker_version,
|
||||
CadvisorVersion: info.VERSION,
|
||||
CadvisorVersion: version.VERSION,
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
@ -30,7 +30,7 @@ import (
|
||||
"github.com/google/cadvisor/container/docker"
|
||||
"github.com/google/cadvisor/container/raw"
|
||||
"github.com/google/cadvisor/events"
|
||||
"github.com/google/cadvisor/info"
|
||||
info "github.com/google/cadvisor/info/v1"
|
||||
"github.com/google/cadvisor/storage/memory"
|
||||
"github.com/google/cadvisor/utils/cpuload"
|
||||
"github.com/google/cadvisor/utils/oomparser"
|
||||
|
@ -16,7 +16,7 @@ package manager
|
||||
|
||||
import (
|
||||
"github.com/google/cadvisor/events"
|
||||
"github.com/google/cadvisor/info"
|
||||
info "github.com/google/cadvisor/info/v1"
|
||||
"github.com/stretchr/testify/mock"
|
||||
)
|
||||
|
||||
|
@ -24,8 +24,8 @@ import (
|
||||
|
||||
"github.com/google/cadvisor/container"
|
||||
"github.com/google/cadvisor/container/docker"
|
||||
"github.com/google/cadvisor/info"
|
||||
itest "github.com/google/cadvisor/info/test"
|
||||
info "github.com/google/cadvisor/info/v1"
|
||||
itest "github.com/google/cadvisor/info/v1/test"
|
||||
"github.com/google/cadvisor/storage/memory"
|
||||
"github.com/google/cadvisor/utils/sysfs/fakesysfs"
|
||||
)
|
||||
|
@ -19,7 +19,7 @@ import (
|
||||
"reflect"
|
||||
"testing"
|
||||
|
||||
"github.com/google/cadvisor/info"
|
||||
info "github.com/google/cadvisor/info/v1"
|
||||
"github.com/google/cadvisor/utils/sysfs"
|
||||
"github.com/google/cadvisor/utils/sysfs/fakesysfs"
|
||||
)
|
||||
|
@ -27,7 +27,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"github.com/google/cadvisor/info"
|
||||
info "github.com/google/cadvisor/info/v1"
|
||||
"github.com/google/cadvisor/manager"
|
||||
)
|
||||
|
||||
|
@ -23,7 +23,7 @@ import (
|
||||
|
||||
"github.com/golang/glog"
|
||||
"github.com/google/cadvisor/container/docker"
|
||||
"github.com/google/cadvisor/info"
|
||||
info "github.com/google/cadvisor/info/v1"
|
||||
"github.com/google/cadvisor/manager"
|
||||
)
|
||||
|
||||
|
@ -22,7 +22,7 @@ import (
|
||||
|
||||
auth "github.com/abbot/go-http-auth"
|
||||
"github.com/golang/glog"
|
||||
"github.com/google/cadvisor/info"
|
||||
info "github.com/google/cadvisor/info/v1"
|
||||
"github.com/google/cadvisor/manager"
|
||||
)
|
||||
|
||||
|
@ -20,7 +20,7 @@ import (
|
||||
"time"
|
||||
|
||||
bigquery "code.google.com/p/google-api-go-client/bigquery/v2"
|
||||
"github.com/google/cadvisor/info"
|
||||
info "github.com/google/cadvisor/info/v1"
|
||||
"github.com/google/cadvisor/storage"
|
||||
"github.com/google/cadvisor/storage/bigquery/client"
|
||||
)
|
||||
|
@ -19,7 +19,7 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/google/cadvisor/info"
|
||||
info "github.com/google/cadvisor/info/v1"
|
||||
influxdb "github.com/influxdb/influxdb/client"
|
||||
)
|
||||
|
||||
|
@ -23,7 +23,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/google/cadvisor/info"
|
||||
info "github.com/google/cadvisor/info/v1"
|
||||
"github.com/google/cadvisor/storage"
|
||||
"github.com/google/cadvisor/storage/test"
|
||||
influxdb "github.com/influxdb/influxdb/client"
|
||||
|
@ -20,7 +20,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"github.com/google/cadvisor/info"
|
||||
info "github.com/google/cadvisor/info/v1"
|
||||
"github.com/google/cadvisor/storage"
|
||||
)
|
||||
|
||||
|
@ -18,7 +18,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/google/cadvisor/info"
|
||||
info "github.com/google/cadvisor/info/v1"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
@ -18,7 +18,7 @@ import (
|
||||
"sort"
|
||||
"time"
|
||||
|
||||
"github.com/google/cadvisor/info"
|
||||
info "github.com/google/cadvisor/info/v1"
|
||||
)
|
||||
|
||||
// A circular buffer for ContainerStats.
|
||||
|
@ -20,7 +20,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/google/cadvisor/info"
|
||||
info "github.com/google/cadvisor/info/v1"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
package storage
|
||||
|
||||
import "github.com/google/cadvisor/info"
|
||||
import info "github.com/google/cadvisor/info/v1"
|
||||
|
||||
type StorageDriver interface {
|
||||
AddStats(ref info.ContainerReference, stats *info.ContainerStats) error
|
||||
|
@ -15,7 +15,7 @@
|
||||
package test
|
||||
|
||||
import (
|
||||
"github.com/google/cadvisor/info"
|
||||
info "github.com/google/cadvisor/info/v1"
|
||||
"github.com/stretchr/testify/mock"
|
||||
)
|
||||
|
||||
|
@ -20,7 +20,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/google/cadvisor/info"
|
||||
info "github.com/google/cadvisor/info/v1"
|
||||
"github.com/google/cadvisor/storage"
|
||||
)
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
package summary
|
||||
|
||||
import (
|
||||
"github.com/google/cadvisor/info"
|
||||
info "github.com/google/cadvisor/info/v1"
|
||||
)
|
||||
|
||||
// Manages a buffer of usage samples.
|
||||
|
@ -18,7 +18,7 @@ import (
|
||||
"reflect"
|
||||
"testing"
|
||||
|
||||
"github.com/google/cadvisor/info"
|
||||
info "github.com/google/cadvisor/info/v1"
|
||||
)
|
||||
|
||||
func createSample(i uint64) info.Usage {
|
||||
|
@ -22,7 +22,7 @@ import (
|
||||
"sort"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"github.com/google/cadvisor/info"
|
||||
info "github.com/google/cadvisor/info/v1"
|
||||
)
|
||||
|
||||
const secondsToMilliSeconds = 1000
|
||||
|
@ -18,7 +18,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/google/cadvisor/info"
|
||||
info "github.com/google/cadvisor/info/v1"
|
||||
)
|
||||
|
||||
const Nanosecond = 1000000000
|
||||
|
@ -25,7 +25,7 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/google/cadvisor/info"
|
||||
info "github.com/google/cadvisor/info/v1"
|
||||
)
|
||||
|
||||
// Usage fields we track for generating percentiles.
|
||||
|
@ -18,7 +18,7 @@ import (
|
||||
"fmt"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"github.com/google/cadvisor/info"
|
||||
info "github.com/google/cadvisor/info/v1"
|
||||
"github.com/google/cadvisor/utils/cpuload/netlink"
|
||||
"github.com/google/cadvisor/utils/cpuload/scheddebug"
|
||||
)
|
||||
|
@ -20,7 +20,7 @@ import (
|
||||
"fmt"
|
||||
"syscall"
|
||||
|
||||
"github.com/google/cadvisor/info"
|
||||
info "github.com/google/cadvisor/info/v1"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -19,7 +19,7 @@ import (
|
||||
"os"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"github.com/google/cadvisor/info"
|
||||
info "github.com/google/cadvisor/info/v1"
|
||||
)
|
||||
|
||||
type NetlinkReader struct {
|
||||
|
@ -25,7 +25,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"github.com/google/cadvisor/info"
|
||||
info "github.com/google/cadvisor/info/v1"
|
||||
"github.com/google/cadvisor/utils"
|
||||
)
|
||||
|
||||
|
@ -20,7 +20,7 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/google/cadvisor/info"
|
||||
info "github.com/google/cadvisor/info/v1"
|
||||
"github.com/google/cadvisor/utils/sysfs"
|
||||
)
|
||||
|
||||
|
@ -17,7 +17,7 @@ package sysinfo
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/google/cadvisor/info"
|
||||
info "github.com/google/cadvisor/info/v1"
|
||||
"github.com/google/cadvisor/utils/sysfs"
|
||||
"github.com/google/cadvisor/utils/sysfs/fakesysfs"
|
||||
)
|
||||
|
@ -12,7 +12,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package info
|
||||
package version
|
||||
|
||||
// Version of cAdvisor.
|
||||
const VERSION = "0.10.1"
|
Loading…
Reference in New Issue
Block a user