remove support for influxdb until influxdb/influxdb#756 get fixed

This commit is contained in:
Nan Deng 2014-07-16 18:00:18 -07:00
parent 033ae4f7bd
commit bdd2b021c3
3 changed files with 25 additions and 22 deletions

View File

@ -12,6 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
// +build ignore
package influxdb
import (
@ -22,7 +24,7 @@ import (
"github.com/google/cadvisor/info"
"github.com/google/cadvisor/storage"
"github.com/influxdb/influxdb-go"
"github.com/influxdb/influxdb/client"
)
type influxdbStorage struct {

View File

@ -12,6 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
// +build ignore
package influxdb
import (
@ -21,7 +23,7 @@ import (
"github.com/google/cadvisor/storage"
"github.com/google/cadvisor/storage/test"
"github.com/influxdb/influxdb-go"
"github.com/influxdb/influxdb/client"
)
func runStorageTest(f func(storage.StorageDriver, *testing.T), t *testing.T) {

View File

@ -17,11 +17,8 @@ package main
import (
"flag"
"fmt"
"os"
"time"
"github.com/google/cadvisor/storage"
"github.com/google/cadvisor/storage/influxdb"
"github.com/google/cadvisor/storage/memory"
)
@ -43,24 +40,26 @@ func NewStorageDriver(driverName string) (storage.StorageDriver, error) {
case "memory":
storageDriver = memory.New(*argSampleSize, *argHistoryDuration)
return storageDriver, nil
case "influxdb":
var hostname string
hostname, err = os.Hostname()
if err != nil {
return nil, err
}
/*
case "influxdb":
var hostname string
hostname, err = os.Hostname()
if err != nil {
return nil, err
}
storageDriver, err = influxdb.New(
hostname,
"cadvisorTable",
*argDbName,
*argDbUsername,
*argDbPassword,
*argDbHost,
*argDbIsSecure,
// TODO(monnand): One hour? Or user-defined?
1*time.Hour,
)
storageDriver, err = influxdb.New(
hostname,
"cadvisorTable",
*argDbName,
*argDbUsername,
*argDbPassword,
*argDbHost,
*argDbIsSecure,
// TODO(monnand): One hour? Or user-defined?
1*time.Hour,
)
*/
default:
err = fmt.Errorf("Unknown database driver: %v", *argDbDriver)
}