Remove memory storage driver and make empty the default.
This fixes the current cAdvisor HEAD.
This commit is contained in:
parent
5200138f3e
commit
fd784cbca2
@ -34,7 +34,7 @@ import (
|
||||
var argPort = flag.Int("port", 8080, "port to listen")
|
||||
var maxProcs = flag.Int("max_procs", 0, "max number of CPUs that can be used simultaneously. Less than 1 for default (number of cores).")
|
||||
|
||||
var argDbDriver = flag.String("storage_driver", "memory", "storage driver to use. Options are: memory (default), bigquery, and influxdb")
|
||||
var argDbDriver = flag.String("storage_driver", "", "storage driver to use. Empty means none. Options are: <empty> (default), bigquery, and influxdb")
|
||||
|
||||
func main() {
|
||||
flag.Parse()
|
||||
|
@ -49,6 +49,8 @@ func NewStorageDriver(driverName string) (*memory.InMemoryStorage, error) {
|
||||
samplesToCache = statsRequestedByUI
|
||||
}
|
||||
switch driverName {
|
||||
case "":
|
||||
backendStorage = nil
|
||||
case "influxdb":
|
||||
var hostname string
|
||||
hostname, err = os.Hostname()
|
||||
@ -87,7 +89,7 @@ func NewStorageDriver(driverName string) (*memory.InMemoryStorage, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
glog.Infof("Caching %d recent stats in memory; using %v storage driver\n", samplesToCache, driverName)
|
||||
glog.Infof("Caching %d recent stats in memory; using \"%v\" storage driver\n", samplesToCache, driverName)
|
||||
storageDriver = memory.New(samplesToCache, samplesToCache, backendStorage)
|
||||
return storageDriver, nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user