├── .gitignore ├── .travis.yml ├── Dockerfile ├── Gopkg.lock ├── Gopkg.toml ├── LICENSE.txt ├── README.md ├── goreleaser.yml ├── tools ├── README.md ├── change_metric_collection_level.py └── requirements.txt ├── vendor ├── github.com │ ├── davecgh │ │ └── go-spew │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── cov_report.sh │ │ │ ├── spew │ │ │ ├── bypass.go │ │ │ ├── bypasssafe.go │ │ │ ├── common.go │ │ │ ├── common_test.go │ │ │ ├── config.go │ │ │ ├── doc.go │ │ │ ├── dump.go │ │ │ ├── dump_test.go │ │ │ ├── dumpcgo_test.go │ │ │ ├── dumpnocgo_test.go │ │ │ ├── example_test.go │ │ │ ├── format.go │ │ │ ├── format_test.go │ │ │ ├── internal_test.go │ │ │ ├── internalunsafe_test.go │ │ │ ├── spew.go │ │ │ ├── spew_test.go │ │ │ └── testdata │ │ │ │ └── dumpcgo.go │ │ │ └── test_coverage.txt │ ├── influxdata │ │ └── influxdb │ │ │ ├── .dockerignore │ │ │ ├── .github │ │ │ ├── ISSUE_TEMPLATE.md │ │ │ └── PULL_REQUEST_TEMPLATE.md │ │ │ ├── .gitignore │ │ │ ├── .hooks │ │ │ └── pre-commit │ │ │ ├── .mention-bot │ │ │ ├── CHANGELOG.md │ │ │ ├── CODING_GUIDELINES.md │ │ │ ├── CONTRIBUTING.md │ │ │ ├── Dockerfile_build_ubuntu32 │ │ │ ├── Dockerfile_build_ubuntu64 │ │ │ ├── Dockerfile_build_ubuntu64_git │ │ │ ├── Dockerfile_test_ubuntu32 │ │ │ ├── Godeps │ │ │ ├── LICENSE │ │ │ ├── LICENSE_OF_DEPENDENCIES.md │ │ │ ├── Makefile │ │ │ ├── QUERIES.md │ │ │ ├── README.md │ │ │ ├── TODO.md │ │ │ ├── appveyor.yml │ │ │ ├── build.py │ │ │ ├── build.sh │ │ │ ├── circle-test.sh │ │ │ ├── circle.yml │ │ │ ├── client │ │ │ ├── README.md │ │ │ ├── example_test.go │ │ │ ├── influxdb.go │ │ │ ├── influxdb_test.go │ │ │ └── v2 │ │ │ │ ├── client.go │ │ │ │ ├── client_test.go │ │ │ │ ├── example_test.go │ │ │ │ └── udp.go │ │ │ ├── cmd │ │ │ ├── influx │ │ │ │ ├── cli │ │ │ │ │ ├── cli.go │ │ │ │ │ ├── cli_internal_test.go │ │ │ │ │ ├── cli_test.go │ │ │ │ │ ├── parser.go │ │ │ │ │ └── parser_internal_test.go │ │ │ │ └── main.go │ │ │ ├── influx_inspect │ │ │ │ ├── README.md │ │ │ │ ├── dumptsi │ │ │ │ │ └── dumptsi.go │ │ │ │ ├── dumptsm │ │ │ │ │ ├── dumptsm.go │ │ │ │ │ └── dumptsm_test.go │ │ │ │ ├── export │ │ │ │ │ ├── export.go │ │ │ │ │ └── export_test.go │ │ │ │ ├── help │ │ │ │ │ ├── help.go │ │ │ │ │ └── help_test.go │ │ │ │ ├── main.go │ │ │ │ ├── report │ │ │ │ │ ├── report.go │ │ │ │ │ └── report_test.go │ │ │ │ └── verify │ │ │ │ │ ├── verify.go │ │ │ │ │ └── verify_test.go │ │ │ ├── influx_stress │ │ │ │ ├── README.md │ │ │ │ ├── examples │ │ │ │ │ └── template.toml │ │ │ │ └── influx_stress.go │ │ │ ├── influx_tsm │ │ │ │ ├── README.md │ │ │ │ ├── b1 │ │ │ │ │ └── reader.go │ │ │ │ ├── bz1 │ │ │ │ │ └── reader.go │ │ │ │ ├── converter.go │ │ │ │ ├── main.go │ │ │ │ ├── stats │ │ │ │ │ └── stats.go │ │ │ │ ├── tracker.go │ │ │ │ └── tsdb │ │ │ │ │ ├── codec.go │ │ │ │ │ ├── database.go │ │ │ │ │ ├── internal │ │ │ │ │ └── meta.pb.go │ │ │ │ │ └── types.go │ │ │ ├── influxd │ │ │ │ ├── backup │ │ │ │ │ └── backup.go │ │ │ │ ├── help │ │ │ │ │ └── help.go │ │ │ │ ├── main.go │ │ │ │ ├── restore │ │ │ │ │ └── restore.go │ │ │ │ └── run │ │ │ │ │ ├── command.go │ │ │ │ │ ├── config.go │ │ │ │ │ ├── config_command.go │ │ │ │ │ ├── config_test.go │ │ │ │ │ └── server.go │ │ │ └── parse.go │ │ │ ├── coordinator │ │ │ ├── config.go │ │ │ ├── config_test.go │ │ │ ├── meta_client.go │ │ │ ├── meta_client_test.go │ │ │ ├── points_writer.go │ │ │ ├── points_writer_internal_test.go │ │ │ ├── points_writer_test.go │ │ │ ├── shard_mapper.go │ │ │ ├── shard_mapper_test.go │ │ │ ├── statement_executor.go │ │ │ └── statement_executor_test.go │ │ │ ├── errors.go │ │ │ ├── etc │ │ │ ├── burn-in │ │ │ │ ├── .rvmrc │ │ │ │ ├── Gemfile │ │ │ │ ├── Gemfile.lock │ │ │ │ ├── burn-in.rb │ │ │ │ ├── log.rb │ │ │ │ ├── random_gaussian.rb │ │ │ │ └── random_points.rb │ │ │ └── config.sample.toml │ │ │ ├── gobuild.sh │ │ │ ├── importer │ │ │ ├── README.md │ │ │ └── v8 │ │ │ │ └── importer.go │ │ │ ├── influxdb.go │ │ │ ├── influxql │ │ │ ├── README.md │ │ │ ├── ast.go │ │ │ ├── ast_test.go │ │ │ ├── call_iterator.go │ │ │ ├── call_iterator_test.go │ │ │ ├── cast.go │ │ │ ├── doc.go │ │ │ ├── emitter.go │ │ │ ├── emitter_test.go │ │ │ ├── functions.gen.go │ │ │ ├── functions.gen.go.tmpl │ │ │ ├── functions.go │ │ │ ├── functions_test.go │ │ │ ├── influxql.go │ │ │ ├── internal │ │ │ │ ├── internal.pb.go │ │ │ │ └── internal.proto │ │ │ ├── iterator.gen.go │ │ │ ├── iterator.gen.go.tmpl │ │ │ ├── iterator.go │ │ │ ├── iterator_mapper.go │ │ │ ├── iterator_mapper_test.go │ │ │ ├── iterator_test.go │ │ │ ├── linear.go │ │ │ ├── monitor.go │ │ │ ├── neldermead │ │ │ │ ├── neldermead.go │ │ │ │ └── neldermead_test.go │ │ │ ├── parser.go │ │ │ ├── parser_test.go │ │ │ ├── point.gen.go │ │ │ ├── point.gen.go.tmpl │ │ │ ├── point.go │ │ │ ├── point_test.go │ │ │ ├── query_executor.go │ │ │ ├── query_executor_test.go │ │ │ ├── result.go │ │ │ ├── sanitize.go │ │ │ ├── sanitize_test.go │ │ │ ├── scanner.go │ │ │ ├── scanner_test.go │ │ │ ├── select.go │ │ │ ├── select_test.go │ │ │ ├── statement_rewriter.go │ │ │ ├── statement_rewriter_test.go │ │ │ ├── subquery.go │ │ │ ├── task_manager.go │ │ │ ├── tmpldata │ │ │ └── token.go │ │ │ ├── internal │ │ │ └── meta_client.go │ │ │ ├── man │ │ │ ├── Makefile │ │ │ ├── README.md │ │ │ ├── footer.txt │ │ │ ├── influx.txt │ │ │ ├── influx_inspect.txt │ │ │ ├── influx_stress.txt │ │ │ ├── influx_tsm.txt │ │ │ ├── influxd-backup.txt │ │ │ ├── influxd-config.txt │ │ │ ├── influxd-restore.txt │ │ │ ├── influxd-run.txt │ │ │ ├── influxd-version.txt │ │ │ └── influxd.txt │ │ │ ├── models │ │ │ ├── consistency.go │ │ │ ├── inline_fnv.go │ │ │ ├── inline_fnv_test.go │ │ │ ├── inline_strconv_parse.go │ │ │ ├── inline_strconv_parse_test.go │ │ │ ├── points.go │ │ │ ├── points_internal_test.go │ │ │ ├── points_test.go │ │ │ ├── rows.go │ │ │ ├── statistic.go │ │ │ ├── statistic_test.go │ │ │ └── time.go │ │ │ ├── monitor │ │ │ ├── README.md │ │ │ ├── build_info.go │ │ │ ├── config.go │ │ │ ├── config_test.go │ │ │ ├── diagnostics │ │ │ │ └── diagnostics.go │ │ │ ├── go_runtime.go │ │ │ ├── network.go │ │ │ ├── reporter.go │ │ │ ├── service.go │ │ │ └── system.go │ │ │ ├── nightly.sh │ │ │ ├── node.go │ │ │ ├── pkg │ │ │ ├── README.md │ │ │ ├── bloom │ │ │ │ ├── bloom.go │ │ │ │ └── bloom_test.go │ │ │ ├── bytesutil │ │ │ │ └── bytesutil.go │ │ │ ├── deep │ │ │ │ └── equal.go │ │ │ ├── escape │ │ │ │ ├── bytes.go │ │ │ │ ├── bytes_test.go │ │ │ │ ├── strings.go │ │ │ │ └── strings_test.go │ │ │ ├── estimator │ │ │ │ ├── hll │ │ │ │ │ ├── compressed.go │ │ │ │ │ ├── empirical_data.go │ │ │ │ │ ├── hll.go │ │ │ │ │ └── hll_test.go │ │ │ │ └── sketch.go │ │ │ ├── limiter │ │ │ │ └── fixed.go │ │ │ ├── mmap │ │ │ │ ├── mmap_test.go │ │ │ │ ├── mmap_unix.go │ │ │ │ └── mmap_windows.go │ │ │ ├── pool │ │ │ │ ├── bytes.go │ │ │ │ ├── bytes_test.go │ │ │ │ └── generic.go │ │ │ ├── rhh │ │ │ │ ├── rhh.go │ │ │ │ └── rhh_test.go │ │ │ └── slices │ │ │ │ └── strings.go │ │ │ ├── releng │ │ │ ├── README.md │ │ │ ├── _go_versions.sh │ │ │ ├── raw-binaries │ │ │ │ ├── Dockerfile │ │ │ │ ├── build.bash │ │ │ │ └── fs │ │ │ │ │ └── usr │ │ │ │ │ └── local │ │ │ │ │ └── bin │ │ │ │ │ └── influxdb_raw_binaries.bash │ │ │ ├── source-tarball │ │ │ │ ├── Dockerfile │ │ │ │ ├── build.bash │ │ │ │ └── fs │ │ │ │ │ └── usr │ │ │ │ │ └── local │ │ │ │ │ └── bin │ │ │ │ │ └── influxdb_tarball.bash │ │ │ └── unit-tests │ │ │ │ ├── Dockerfile │ │ │ │ ├── fs │ │ │ │ └── usr │ │ │ │ │ └── local │ │ │ │ │ └── bin │ │ │ │ │ └── influxdb_prebuild_tests.bash │ │ │ │ └── run.bash │ │ │ ├── scripts │ │ │ ├── influxdb.service │ │ │ ├── init.sh │ │ │ ├── logrotate │ │ │ ├── post-install.sh │ │ │ ├── post-uninstall.sh │ │ │ └── pre-install.sh │ │ │ ├── services │ │ │ ├── collectd │ │ │ │ ├── README.md │ │ │ │ ├── collectd_test.conf │ │ │ │ ├── config.go │ │ │ │ ├── config_test.go │ │ │ │ ├── service.go │ │ │ │ ├── service_test.go │ │ │ │ └── test_client │ │ │ │ │ ├── README.md │ │ │ │ │ └── client.go │ │ │ ├── continuous_querier │ │ │ │ ├── config.go │ │ │ │ ├── config_test.go │ │ │ │ ├── continuous_queries.md │ │ │ │ ├── service.go │ │ │ │ └── service_test.go │ │ │ ├── graphite │ │ │ │ ├── README.md │ │ │ │ ├── config.go │ │ │ │ ├── config_test.go │ │ │ │ ├── errors.go │ │ │ │ ├── parser.go │ │ │ │ ├── parser_test.go │ │ │ │ ├── service.go │ │ │ │ └── service_test.go │ │ │ ├── httpd │ │ │ │ ├── config.go │ │ │ │ ├── config_test.go │ │ │ │ ├── handler.go │ │ │ │ ├── handler_test.go │ │ │ │ ├── listen.go │ │ │ │ ├── listen_test.go │ │ │ │ ├── pprof.go │ │ │ │ ├── requests.go │ │ │ │ ├── response_logger.go │ │ │ │ ├── response_writer.go │ │ │ │ ├── response_writer_test.go │ │ │ │ └── service.go │ │ │ ├── meta │ │ │ │ ├── client.go │ │ │ │ ├── client_test.go │ │ │ │ ├── config.go │ │ │ │ ├── config_test.go │ │ │ │ ├── data.go │ │ │ │ ├── data_internal_test.go │ │ │ │ ├── data_test.go │ │ │ │ ├── errors.go │ │ │ │ ├── file_unix.go │ │ │ │ ├── file_windows.go │ │ │ │ ├── internal │ │ │ │ │ ├── meta.pb.go │ │ │ │ │ └── meta.proto │ │ │ │ ├── meta_test.go │ │ │ │ ├── query_authorizer.go │ │ │ │ └── write_authorizer.go │ │ │ ├── opentsdb │ │ │ │ ├── README.md │ │ │ │ ├── config.go │ │ │ │ ├── config_test.go │ │ │ │ ├── handler.go │ │ │ │ ├── service.go │ │ │ │ └── service_test.go │ │ │ ├── precreator │ │ │ │ ├── README.md │ │ │ │ ├── config.go │ │ │ │ ├── config_test.go │ │ │ │ ├── service.go │ │ │ │ └── service_test.go │ │ │ ├── retention │ │ │ │ ├── config.go │ │ │ │ ├── config_test.go │ │ │ │ └── service.go │ │ │ ├── snapshotter │ │ │ │ ├── client.go │ │ │ │ ├── service.go │ │ │ │ └── service_test.go │ │ │ ├── subscriber │ │ │ │ ├── config.go │ │ │ │ ├── config_test.go │ │ │ │ ├── http.go │ │ │ │ ├── service.go │ │ │ │ ├── service_test.go │ │ │ │ └── udp.go │ │ │ └── udp │ │ │ │ ├── README.md │ │ │ │ ├── config.go │ │ │ │ ├── config_test.go │ │ │ │ ├── service.go │ │ │ │ └── service_test.go │ │ │ ├── stress │ │ │ ├── DESIGN.md │ │ │ ├── README.md │ │ │ ├── basic.go │ │ │ ├── config.go │ │ │ ├── run.go │ │ │ ├── stress.toml │ │ │ ├── stress_test.go │ │ │ ├── stress_test_server │ │ │ │ └── server.go │ │ │ ├── template.go │ │ │ ├── util.go │ │ │ └── v2 │ │ │ │ ├── DESIGN.md │ │ │ │ ├── README.md │ │ │ │ ├── influx_stress_v2.png │ │ │ │ ├── iql │ │ │ │ ├── default.iql │ │ │ │ └── file.iql │ │ │ │ ├── main.go │ │ │ │ ├── statement │ │ │ │ ├── exec.go │ │ │ │ ├── exec_test.go │ │ │ │ ├── function.go │ │ │ │ ├── function_test.go │ │ │ │ ├── go.go │ │ │ │ ├── go_test.go │ │ │ │ ├── influxql.go │ │ │ │ ├── influxql_test.go │ │ │ │ ├── insert.go │ │ │ │ ├── insert_test.go │ │ │ │ ├── query.go │ │ │ │ ├── query_test.go │ │ │ │ ├── report.go │ │ │ │ ├── report_test.go │ │ │ │ ├── response_time.go │ │ │ │ ├── response_time_test.go │ │ │ │ ├── set.go │ │ │ │ ├── set_test.go │ │ │ │ ├── statement.go │ │ │ │ ├── template.go │ │ │ │ ├── template_test.go │ │ │ │ ├── timestamp.go │ │ │ │ ├── timestamp_test.go │ │ │ │ ├── wait.go │ │ │ │ └── wait_test.go │ │ │ │ ├── stress_client │ │ │ │ ├── commune.go │ │ │ │ ├── commune_test.go │ │ │ │ ├── directive.go │ │ │ │ ├── directive_test.go │ │ │ │ ├── package.go │ │ │ │ ├── package_test.go │ │ │ │ ├── reporting.go │ │ │ │ ├── reporting_test.go │ │ │ │ ├── response.go │ │ │ │ ├── response_test.go │ │ │ │ ├── stressTest.go │ │ │ │ ├── stressTest_test.go │ │ │ │ ├── stress_client.go │ │ │ │ ├── stress_client_query.go │ │ │ │ ├── stress_client_write.go │ │ │ │ ├── tracer.go │ │ │ │ ├── tracer_test.go │ │ │ │ └── util.go │ │ │ │ └── stressql │ │ │ │ ├── parser.go │ │ │ │ ├── parser_test.go │ │ │ │ └── statement │ │ │ │ ├── parser.go │ │ │ │ └── parser_test.go │ │ │ ├── tcp │ │ │ ├── mux.go │ │ │ └── mux_test.go │ │ │ ├── test.sh │ │ │ ├── tests │ │ │ ├── README.md │ │ │ ├── backup_restore_test.go │ │ │ ├── server_bench_test.go │ │ │ ├── server_helpers.go │ │ │ ├── server_suite.go │ │ │ └── server_test.go │ │ │ ├── toml │ │ │ ├── toml.go │ │ │ └── toml_test.go │ │ │ ├── tsdb │ │ │ ├── README.md │ │ │ ├── batcher.go │ │ │ ├── batcher_test.go │ │ │ ├── config.go │ │ │ ├── config_test.go │ │ │ ├── cursor.go │ │ │ ├── doc.go │ │ │ ├── engine.go │ │ │ ├── engine │ │ │ │ ├── engine.go │ │ │ │ └── tsm1 │ │ │ │ │ ├── DESIGN.md │ │ │ │ │ ├── MANIFEST │ │ │ │ │ ├── bit_reader.go │ │ │ │ │ ├── bit_reader_test.go │ │ │ │ │ ├── bool.go │ │ │ │ │ ├── bool_test.go │ │ │ │ │ ├── cache.go │ │ │ │ │ ├── cache_race_test.go │ │ │ │ │ ├── cache_test.go │ │ │ │ │ ├── compact.gen.go │ │ │ │ │ ├── compact.gen.go.tmpl │ │ │ │ │ ├── compact.gen.go.tmpldata │ │ │ │ │ ├── compact.go │ │ │ │ │ ├── compact_test.go │ │ │ │ │ ├── cursor.go │ │ │ │ │ ├── encoding.gen.go │ │ │ │ │ ├── encoding.gen.go.tmpl │ │ │ │ │ ├── encoding.gen.go.tmpldata │ │ │ │ │ ├── encoding.go │ │ │ │ │ ├── encoding_test.go │ │ │ │ │ ├── engine.go │ │ │ │ │ ├── engine_test.go │ │ │ │ │ ├── file_store.gen.go │ │ │ │ │ ├── file_store.gen.go.tmpl │ │ │ │ │ ├── file_store.gen.go.tmpldata │ │ │ │ │ ├── file_store.go │ │ │ │ │ ├── file_store_internal_test.go │ │ │ │ │ ├── file_store_test.go │ │ │ │ │ ├── file_unix.go │ │ │ │ │ ├── file_windows.go │ │ │ │ │ ├── float.go │ │ │ │ │ ├── float_test.go │ │ │ │ │ ├── int.go │ │ │ │ │ ├── int_test.go │ │ │ │ │ ├── iterator.gen.go │ │ │ │ │ ├── iterator.gen.go.tmpl │ │ │ │ │ ├── iterator.gen.go.tmpldata │ │ │ │ │ ├── iterator.go │ │ │ │ │ ├── mmap_solaris.go │ │ │ │ │ ├── mmap_unix.go │ │ │ │ │ ├── mmap_windows.go │ │ │ │ │ ├── pools.go │ │ │ │ │ ├── reader.go │ │ │ │ │ ├── reader_test.go │ │ │ │ │ ├── ring.go │ │ │ │ │ ├── ring_test.go │ │ │ │ │ ├── string.go │ │ │ │ │ ├── string_test.go │ │ │ │ │ ├── timestamp.go │ │ │ │ │ ├── timestamp_test.go │ │ │ │ │ ├── tombstone.go │ │ │ │ │ ├── tombstone_test.go │ │ │ │ │ ├── wal.go │ │ │ │ │ ├── wal_test.go │ │ │ │ │ ├── writer.go │ │ │ │ │ └── writer_test.go │ │ │ ├── index.go │ │ │ ├── index │ │ │ │ ├── index.go │ │ │ │ ├── inmem │ │ │ │ │ ├── inmem.go │ │ │ │ │ ├── meta.go │ │ │ │ │ └── meta_test.go │ │ │ │ ├── internal │ │ │ │ │ └── file_set.go │ │ │ │ └── tsi1 │ │ │ │ │ ├── doc.go │ │ │ │ │ ├── file_set.go │ │ │ │ │ ├── file_set_test.go │ │ │ │ │ ├── index.go │ │ │ │ │ ├── index_file.go │ │ │ │ │ ├── index_file_test.go │ │ │ │ │ ├── index_files.go │ │ │ │ │ ├── index_files_test.go │ │ │ │ │ ├── index_test.go │ │ │ │ │ ├── log_file.go │ │ │ │ │ ├── log_file_test.go │ │ │ │ │ ├── measurement_block.go │ │ │ │ │ ├── measurement_block_test.go │ │ │ │ │ ├── series_block.go │ │ │ │ │ ├── series_block_test.go │ │ │ │ │ ├── tag_block.go │ │ │ │ │ ├── tag_block_test.go │ │ │ │ │ ├── tsi1.go │ │ │ │ │ └── tsi1_test.go │ │ │ ├── internal │ │ │ │ ├── meta.pb.go │ │ │ │ └── meta.proto │ │ │ ├── meta.go │ │ │ ├── meta_test.go │ │ │ ├── shard.go │ │ │ ├── shard_internal_test.go │ │ │ ├── shard_test.go │ │ │ ├── store.go │ │ │ ├── store_internal_test.go │ │ │ └── store_test.go │ │ │ └── uuid │ │ │ └── uuid.go │ └── vmware │ │ └── govmomi │ │ ├── .drone.sec │ │ ├── .drone.yml │ │ ├── .gitignore │ │ ├── .mailmap │ │ ├── .travis.yml │ │ ├── CHANGELOG.md │ │ ├── CONTRIBUTING.md │ │ ├── CONTRIBUTORS │ │ ├── LICENSE.txt │ │ ├── Makefile │ │ ├── README.md │ │ ├── client.go │ │ ├── client_test.go │ │ ├── event │ │ ├── history_collector.go │ │ ├── manager.go │ │ ├── processor.go │ │ └── sort.go │ │ ├── examples │ │ ├── datastores │ │ │ └── main.go │ │ ├── examples.go │ │ ├── hosts │ │ │ └── main.go │ │ ├── networks │ │ │ └── main.go │ │ └── virtualmachines │ │ │ └── main.go │ │ ├── find │ │ ├── doc.go │ │ ├── error.go │ │ ├── finder.go │ │ └── recurser.go │ │ ├── gen │ │ ├── Gemfile │ │ ├── Gemfile.lock │ │ ├── gen.sh │ │ ├── gen_from_vmodl.rb │ │ ├── gen_from_wsdl.rb │ │ └── vim_wsdl.rb │ │ ├── govc │ │ ├── .gitignore │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── USAGE.md │ │ ├── about │ │ │ ├── cert.go │ │ │ └── command.go │ │ ├── build.sh │ │ ├── cli │ │ │ ├── command.go │ │ │ └── register.go │ │ ├── cluster │ │ │ ├── add.go │ │ │ ├── change.go │ │ │ └── create.go │ │ ├── datacenter │ │ │ ├── create.go │ │ │ └── info.go │ │ ├── datastore │ │ │ ├── cp.go │ │ │ ├── create.go │ │ │ ├── disk │ │ │ │ ├── create.go │ │ │ │ └── info.go │ │ │ ├── download.go │ │ │ ├── info.go │ │ │ ├── ls.go │ │ │ ├── mkdir.go │ │ │ ├── mv.go │ │ │ ├── remove.go │ │ │ ├── rm.go │ │ │ ├── tail.go │ │ │ ├── upload.go │ │ │ └── vsan │ │ │ │ ├── ls.go │ │ │ │ └── rm.go │ │ ├── device │ │ │ ├── boot.go │ │ │ ├── cdrom │ │ │ │ ├── add.go │ │ │ │ ├── eject.go │ │ │ │ └── insert.go │ │ │ ├── connect.go │ │ │ ├── disconnect.go │ │ │ ├── floppy │ │ │ │ ├── add.go │ │ │ │ ├── eject.go │ │ │ │ └── insert.go │ │ │ ├── info.go │ │ │ ├── ls.go │ │ │ ├── remove.go │ │ │ ├── scsi │ │ │ │ └── add.go │ │ │ ├── serial │ │ │ │ ├── add.go │ │ │ │ ├── connect.go │ │ │ │ └── disconnect.go │ │ │ └── usb │ │ │ │ └── add.go │ │ ├── dvs │ │ │ ├── add.go │ │ │ ├── create.go │ │ │ └── portgroup │ │ │ │ ├── add.go │ │ │ │ ├── change.go │ │ │ │ ├── info.go │ │ │ │ └── spec.go │ │ ├── emacs │ │ │ ├── .gitignore │ │ │ ├── Cask │ │ │ ├── Makefile │ │ │ ├── README.md │ │ │ ├── govc.el │ │ │ └── test │ │ │ │ ├── govc-test.el │ │ │ │ └── make.el │ │ ├── env │ │ │ └── command.go │ │ ├── events │ │ │ └── command.go │ │ ├── examples │ │ │ ├── lib │ │ │ │ └── ssh.sh │ │ │ └── vcsa.sh │ │ ├── extension │ │ │ ├── info.go │ │ │ ├── register.go │ │ │ ├── setcert.go │ │ │ └── unregister.go │ │ ├── fields │ │ │ ├── add.go │ │ │ ├── ls.go │ │ │ ├── rename.go │ │ │ ├── rm.go │ │ │ └── set.go │ │ ├── flags │ │ │ ├── client.go │ │ │ ├── common.go │ │ │ ├── datacenter.go │ │ │ ├── datastore.go │ │ │ ├── debug.go │ │ │ ├── empty.go │ │ │ ├── folder.go │ │ │ ├── host_connect.go │ │ │ ├── host_system.go │ │ │ ├── int32.go │ │ │ ├── network.go │ │ │ ├── optional_bool.go │ │ │ ├── optional_bool_test.go │ │ │ ├── output.go │ │ │ ├── resource_pool.go │ │ │ ├── search.go │ │ │ ├── storage_pod.go │ │ │ ├── version.go │ │ │ ├── version_test.go │ │ │ ├── virtual_app.go │ │ │ └── virtual_machine.go │ │ ├── folder │ │ │ ├── create.go │ │ │ └── info.go │ │ ├── host │ │ │ ├── account │ │ │ │ ├── account.go │ │ │ │ ├── create.go │ │ │ │ ├── remove.go │ │ │ │ └── update.go │ │ │ ├── add.go │ │ │ ├── autostart │ │ │ │ ├── add.go │ │ │ │ ├── autostart.go │ │ │ │ ├── configure.go │ │ │ │ ├── info.go │ │ │ │ └── remove.go │ │ │ ├── cert │ │ │ │ ├── csr.go │ │ │ │ ├── info.go │ │ │ │ └── install.go │ │ │ ├── date │ │ │ │ ├── change.go │ │ │ │ └── info.go │ │ │ ├── disconnect.go │ │ │ ├── esxcli │ │ │ │ ├── command.go │ │ │ │ ├── command_test.go │ │ │ │ ├── esxcli.go │ │ │ │ ├── executor.go │ │ │ │ ├── firewall_info.go │ │ │ │ ├── fixtures │ │ │ │ │ ├── network_vm_list.xml │ │ │ │ │ ├── network_vm_port_list.xml │ │ │ │ │ └── system_hostname_get.xml │ │ │ │ ├── guest_info.go │ │ │ │ ├── response.go │ │ │ │ └── response_test.go │ │ │ ├── firewall │ │ │ │ └── find.go │ │ │ ├── info.go │ │ │ ├── maintenance │ │ │ │ ├── enter.go │ │ │ │ └── exit.go │ │ │ ├── option │ │ │ │ ├── ls.go │ │ │ │ └── set.go │ │ │ ├── portgroup │ │ │ │ ├── add.go │ │ │ │ ├── change.go │ │ │ │ ├── info.go │ │ │ │ └── remove.go │ │ │ ├── reconnect.go │ │ │ ├── remove.go │ │ │ ├── service │ │ │ │ ├── command.go │ │ │ │ └── ls.go │ │ │ ├── shutdown.go │ │ │ ├── storage │ │ │ │ ├── info.go │ │ │ │ ├── mark.go │ │ │ │ └── partition.go │ │ │ ├── vnic │ │ │ │ ├── info.go │ │ │ │ └── service.go │ │ │ └── vswitch │ │ │ │ ├── add.go │ │ │ │ ├── info.go │ │ │ │ └── remove.go │ │ ├── importx │ │ │ ├── archive.go │ │ │ ├── folder.go │ │ │ ├── importable.go │ │ │ ├── lease_updater.go │ │ │ ├── options.go │ │ │ ├── ova.go │ │ │ ├── ovf.go │ │ │ ├── spec.go │ │ │ └── vmdk.go │ │ ├── license │ │ │ ├── add.go │ │ │ ├── assign.go │ │ │ ├── assigned.go │ │ │ ├── decode.go │ │ │ ├── ls.go │ │ │ ├── output.go │ │ │ └── remove.go │ │ ├── logs │ │ │ ├── command.go │ │ │ ├── download.go │ │ │ └── ls.go │ │ ├── ls │ │ │ └── command.go │ │ ├── main.go │ │ ├── main_test.go │ │ ├── metric │ │ │ ├── change.go │ │ │ ├── info.go │ │ │ ├── interval │ │ │ │ ├── change.go │ │ │ │ └── info.go │ │ │ ├── ls.go │ │ │ ├── performance.go │ │ │ ├── reset.go │ │ │ └── sample.go │ │ ├── object │ │ │ ├── collect.go │ │ │ ├── destroy.go │ │ │ ├── find.go │ │ │ ├── method.go │ │ │ ├── mv.go │ │ │ ├── reload.go │ │ │ └── rename.go │ │ ├── option │ │ │ ├── ls.go │ │ │ └── set.go │ │ ├── permissions │ │ │ ├── ls.go │ │ │ ├── permissions.go │ │ │ ├── remove.go │ │ │ └── set.go │ │ ├── pool │ │ │ ├── change.go │ │ │ ├── create.go │ │ │ ├── destroy.go │ │ │ ├── help.go │ │ │ ├── info.go │ │ │ └── resource_config_spec.go │ │ ├── release.sh │ │ ├── role │ │ │ ├── create.go │ │ │ ├── ls.go │ │ │ ├── remove.go │ │ │ ├── update.go │ │ │ └── usage.go │ │ ├── session │ │ │ ├── ls.go │ │ │ └── rm.go │ │ ├── test │ │ │ ├── .gitignore │ │ │ ├── README.md │ │ │ ├── boot_order_test.sh │ │ │ ├── clean.sh │ │ │ ├── cli.bats │ │ │ ├── datacenter.bats │ │ │ ├── datastore.bats │ │ │ ├── datastore_file_manager_test.sh │ │ │ ├── datastore_tail_test.sh │ │ │ ├── device.bats │ │ │ ├── esxbox │ │ │ │ └── Vagrantfile │ │ │ ├── esxcli.bats │ │ │ ├── events.bats │ │ │ ├── extension.bats │ │ │ ├── fields.bats │ │ │ ├── firewall.bats │ │ │ ├── folder.bats │ │ │ ├── govc-sim │ │ │ ├── guest_operations_test.sh │ │ │ ├── host.bats │ │ │ ├── host_cert_sign.sh │ │ │ ├── images │ │ │ │ ├── .gitignore │ │ │ │ └── update.sh │ │ │ ├── import.bats │ │ │ ├── license.bats │ │ │ ├── logs.bats │ │ │ ├── ls.bats │ │ │ ├── metric.bats │ │ │ ├── metric_info_test.sh │ │ │ ├── network.bats │ │ │ ├── object.bats │ │ │ ├── pool.bats │ │ │ ├── role.bats │ │ │ ├── session.bats │ │ │ ├── test_helper.bash │ │ │ ├── vcsim │ │ │ │ ├── Vagrantfile │ │ │ │ └── provision.sh │ │ │ └── vm.bats │ │ ├── usage.sh │ │ ├── vapp │ │ │ ├── destroy.go │ │ │ └── power.go │ │ ├── version │ │ │ └── command.go │ │ └── vm │ │ │ ├── change.go │ │ │ ├── clone.go │ │ │ ├── create.go │ │ │ ├── destroy.go │ │ │ ├── disk │ │ │ ├── attach.go │ │ │ ├── change.go │ │ │ └── create.go │ │ │ ├── guest │ │ │ ├── auth.go │ │ │ ├── chmod.go │ │ │ ├── chown.go │ │ │ ├── download.go │ │ │ ├── file_attr.go │ │ │ ├── getenv.go │ │ │ ├── guest.go │ │ │ ├── kill.go │ │ │ ├── ls.go │ │ │ ├── mkdir.go │ │ │ ├── mktemp.go │ │ │ ├── mv.go │ │ │ ├── ps.go │ │ │ ├── rm.go │ │ │ ├── rmdir.go │ │ │ ├── start.go │ │ │ ├── tools.go │ │ │ ├── touch.go │ │ │ └── upload.go │ │ │ ├── info.go │ │ │ ├── ip.go │ │ │ ├── markastemplate.go │ │ │ ├── markasvm.go │ │ │ ├── migrate.go │ │ │ ├── network │ │ │ ├── add.go │ │ │ └── change.go │ │ │ ├── power.go │ │ │ ├── question.go │ │ │ ├── rdm │ │ │ ├── attach.go │ │ │ └── ls.go │ │ │ ├── register.go │ │ │ ├── snapshot │ │ │ ├── create.go │ │ │ ├── remove.go │ │ │ ├── revert.go │ │ │ └── tree.go │ │ │ ├── unregister.go │ │ │ └── vnc.go │ │ ├── guest │ │ ├── auth_manager.go │ │ ├── file_manager.go │ │ ├── operations_manager.go │ │ └── process_manager.go │ │ ├── license │ │ ├── assignment_manager.go │ │ └── manager.go │ │ ├── list │ │ ├── lister.go │ │ ├── path.go │ │ └── path_test.go │ │ ├── object │ │ ├── authorization_manager.go │ │ ├── authorization_manager_internal.go │ │ ├── cluster_compute_resource.go │ │ ├── cluster_compute_resource_test.go │ │ ├── common.go │ │ ├── common_test.go │ │ ├── compute_resource.go │ │ ├── compute_resource_test.go │ │ ├── custom_fields_manager.go │ │ ├── customization_spec_manager.go │ │ ├── datacenter.go │ │ ├── datacenter_test.go │ │ ├── datastore.go │ │ ├── datastore_file.go │ │ ├── datastore_file_manager.go │ │ ├── datastore_path.go │ │ ├── datastore_path_test.go │ │ ├── datastore_test.go │ │ ├── diagnostic_log.go │ │ ├── diagnostic_manager.go │ │ ├── distributed_virtual_portgroup.go │ │ ├── distributed_virtual_portgroup_test.go │ │ ├── distributed_virtual_switch.go │ │ ├── extension_manager.go │ │ ├── file_manager.go │ │ ├── folder.go │ │ ├── folder_test.go │ │ ├── history_collector.go │ │ ├── host_account_manager.go │ │ ├── host_certificate_info.go │ │ ├── host_certificate_info_test.go │ │ ├── host_certificate_manager.go │ │ ├── host_config_manager.go │ │ ├── host_datastore_browser.go │ │ ├── host_datastore_system.go │ │ ├── host_date_time_system.go │ │ ├── host_firewall_system.go │ │ ├── host_network_system.go │ │ ├── host_service_system.go │ │ ├── host_storage_system.go │ │ ├── host_system.go │ │ ├── host_virtual_nic_manager.go │ │ ├── host_vsan_internal_system.go │ │ ├── host_vsan_system.go │ │ ├── http_nfc_lease.go │ │ ├── namespace_manager.go │ │ ├── network.go │ │ ├── network_reference.go │ │ ├── network_test.go │ │ ├── opaque_network.go │ │ ├── option_manager.go │ │ ├── ovf_manager.go │ │ ├── resource_pool.go │ │ ├── search_index.go │ │ ├── search_index_test.go │ │ ├── storage_pod.go │ │ ├── storage_resource_manager.go │ │ ├── task.go │ │ ├── types.go │ │ ├── virtual_app.go │ │ ├── virtual_device_list.go │ │ ├── virtual_device_list_test.go │ │ ├── virtual_disk_manager.go │ │ ├── virtual_disk_manager_internal.go │ │ ├── virtual_machine.go │ │ ├── virtual_machine_test.go │ │ └── vmware_distributed_virtual_switch.go │ │ ├── ovf │ │ ├── cim.go │ │ ├── doc.go │ │ ├── env.go │ │ ├── env_test.go │ │ ├── envelope.go │ │ ├── ovf.go │ │ └── ovf_test.go │ │ ├── pbm │ │ ├── client.go │ │ ├── client_test.go │ │ ├── methods │ │ │ └── methods.go │ │ ├── pbm_util.go │ │ └── types │ │ │ ├── enum.go │ │ │ ├── if.go │ │ │ └── types.go │ │ ├── performance │ │ └── manager.go │ │ ├── property │ │ ├── collector.go │ │ ├── filter.go │ │ ├── filter_test.go │ │ └── wait.go │ │ ├── scripts │ │ ├── .gitignore │ │ ├── contributors.sh │ │ ├── debug-ls.sh │ │ ├── debug-xmlformat.sh │ │ ├── govc-env.bash │ │ ├── govc_bash_completion │ │ ├── headers │ │ │ ├── go.txt │ │ │ └── rb.txt │ │ ├── license.sh │ │ ├── vagrant │ │ │ └── vcsa │ │ │ │ ├── .gitignore │ │ │ │ ├── Vagrantfile │ │ │ │ ├── create-box.sh │ │ │ │ └── vagrant.sh │ │ ├── wireshark-esx.sh │ │ └── wireshark-vcsa.sh │ │ ├── session │ │ ├── keep_alive.go │ │ ├── keep_alive_test.go │ │ ├── manager.go │ │ └── manager_test.go │ │ ├── task │ │ ├── error.go │ │ ├── wait.go │ │ └── wait_test.go │ │ ├── test │ │ ├── doc.go │ │ ├── functional │ │ │ ├── helper.go │ │ │ └── issue_242_test.go │ │ └── helper.go │ │ ├── units │ │ ├── size.go │ │ └── size_test.go │ │ ├── view │ │ ├── container_view.go │ │ ├── list_view.go │ │ └── manager.go │ │ └── vim25 │ │ ├── client.go │ │ ├── client_test.go │ │ ├── debug │ │ └── debug.go │ │ ├── doc.go │ │ ├── methods │ │ ├── fault_test.go │ │ ├── internal.go │ │ ├── methods.go │ │ └── service_content.go │ │ ├── mo │ │ ├── ancestors.go │ │ ├── entity.go │ │ ├── extra.go │ │ ├── fixtures │ │ │ ├── cluster_host_property.xml │ │ │ ├── hostsystem_list_name_property.xml │ │ │ ├── nested_property.xml │ │ │ ├── not_authenticated_fault.xml │ │ │ └── pointer_property.xml │ │ ├── mo.go │ │ ├── reference.go │ │ ├── registry.go │ │ ├── retrieve.go │ │ ├── retrieve_test.go │ │ ├── type_info.go │ │ └── type_info_test.go │ │ ├── progress │ │ ├── aggregator.go │ │ ├── aggregator_test.go │ │ ├── common_test.go │ │ ├── doc.go │ │ ├── prefix.go │ │ ├── prefix_test.go │ │ ├── reader.go │ │ ├── reader_test.go │ │ ├── report.go │ │ ├── scale.go │ │ ├── scale_test.go │ │ ├── sinker.go │ │ ├── tee.go │ │ └── tee_test.go │ │ ├── retry.go │ │ ├── retry_test.go │ │ ├── soap │ │ ├── client.go │ │ ├── client_test.go │ │ ├── debug.go │ │ ├── error.go │ │ ├── soap.go │ │ └── soap_test.go │ │ ├── types │ │ ├── base.go │ │ ├── base_test.go │ │ ├── enum.go │ │ ├── fault.go │ │ ├── helpers.go │ │ ├── if.go │ │ ├── internal.go │ │ ├── registry.go │ │ ├── registry_test.go │ │ ├── types.go │ │ └── types_test.go │ │ └── xml │ │ ├── LICENSE │ │ ├── atom_test.go │ │ ├── example_test.go │ │ ├── extras.go │ │ ├── extras_test.go │ │ ├── marshal.go │ │ ├── marshal_test.go │ │ ├── read.go │ │ ├── read_test.go │ │ ├── typeinfo.go │ │ ├── xml.go │ │ └── xml_test.go └── golang.org │ └── x │ └── net │ ├── .gitattributes │ ├── .gitignore │ ├── AUTHORS │ ├── CONTRIBUTING.md │ ├── CONTRIBUTORS │ ├── LICENSE │ ├── PATENTS │ ├── README.md │ ├── bpf │ ├── asm.go │ ├── constants.go │ ├── doc.go │ ├── instructions.go │ ├── instructions_test.go │ ├── setter.go │ ├── testdata │ │ ├── all_instructions.bpf │ │ └── all_instructions.txt │ ├── vm.go │ ├── vm_aluop_test.go │ ├── vm_bpf_test.go │ ├── vm_extension_test.go │ ├── vm_instructions.go │ ├── vm_jump_test.go │ ├── vm_load_test.go │ ├── vm_ret_test.go │ ├── vm_scratch_test.go │ └── vm_test.go │ ├── codereview.cfg │ ├── context │ ├── context.go │ ├── context_test.go │ ├── ctxhttp │ │ ├── ctxhttp.go │ │ ├── ctxhttp_17_test.go │ │ ├── ctxhttp_pre17.go │ │ ├── ctxhttp_pre17_test.go │ │ └── ctxhttp_test.go │ ├── go17.go │ ├── go19.go │ ├── pre_go17.go │ ├── pre_go19.go │ └── withtimeout_test.go │ ├── dict │ └── dict.go │ ├── dns │ └── dnsmessage │ │ ├── example_test.go │ │ ├── message.go │ │ └── message_test.go │ ├── html │ ├── atom │ │ ├── atom.go │ │ ├── atom_test.go │ │ ├── gen.go │ │ ├── table.go │ │ └── table_test.go │ ├── charset │ │ ├── charset.go │ │ ├── charset_test.go │ │ └── testdata │ │ │ ├── HTTP-charset.html │ │ │ ├── HTTP-vs-UTF-8-BOM.html │ │ │ ├── HTTP-vs-meta-charset.html │ │ │ ├── HTTP-vs-meta-content.html │ │ │ ├── No-encoding-declaration.html │ │ │ ├── README │ │ │ ├── UTF-16BE-BOM.html │ │ │ ├── UTF-16LE-BOM.html │ │ │ ├── UTF-8-BOM-vs-meta-charset.html │ │ │ ├── UTF-8-BOM-vs-meta-content.html │ │ │ ├── meta-charset-attribute.html │ │ │ └── meta-content-attribute.html │ ├── const.go │ ├── doc.go │ ├── doctype.go │ ├── entity.go │ ├── entity_test.go │ ├── escape.go │ ├── escape_test.go │ ├── example_test.go │ ├── foreign.go │ ├── node.go │ ├── node_test.go │ ├── parse.go │ ├── parse_test.go │ ├── render.go │ ├── render_test.go │ ├── testdata │ │ ├── go1.html │ │ └── webkit │ │ │ ├── README │ │ │ ├── adoption01.dat │ │ │ ├── adoption02.dat │ │ │ ├── comments01.dat │ │ │ ├── doctype01.dat │ │ │ ├── entities01.dat │ │ │ ├── entities02.dat │ │ │ ├── html5test-com.dat │ │ │ ├── inbody01.dat │ │ │ ├── isindex.dat │ │ │ ├── pending-spec-changes-plain-text-unsafe.dat │ │ │ ├── pending-spec-changes.dat │ │ │ ├── plain-text-unsafe.dat │ │ │ ├── scriptdata01.dat │ │ │ ├── scripted │ │ │ ├── adoption01.dat │ │ │ └── webkit01.dat │ │ │ ├── tables01.dat │ │ │ ├── tests1.dat │ │ │ ├── tests10.dat │ │ │ ├── tests11.dat │ │ │ ├── tests12.dat │ │ │ ├── tests14.dat │ │ │ ├── tests15.dat │ │ │ ├── tests16.dat │ │ │ ├── tests17.dat │ │ │ ├── tests18.dat │ │ │ ├── tests19.dat │ │ │ ├── tests2.dat │ │ │ ├── tests20.dat │ │ │ ├── tests21.dat │ │ │ ├── tests22.dat │ │ │ ├── tests23.dat │ │ │ ├── tests24.dat │ │ │ ├── tests25.dat │ │ │ ├── tests26.dat │ │ │ ├── tests3.dat │ │ │ ├── tests4.dat │ │ │ ├── tests5.dat │ │ │ ├── tests6.dat │ │ │ ├── tests7.dat │ │ │ ├── tests8.dat │ │ │ ├── tests9.dat │ │ │ ├── tests_innerHTML_1.dat │ │ │ ├── tricky01.dat │ │ │ ├── webkit01.dat │ │ │ └── webkit02.dat │ ├── token.go │ └── token_test.go │ ├── http2 │ ├── .gitignore │ ├── Dockerfile │ ├── Makefile │ ├── README │ ├── ciphers.go │ ├── ciphers_test.go │ ├── client_conn_pool.go │ ├── configure_transport.go │ ├── databuffer.go │ ├── databuffer_test.go │ ├── errors.go │ ├── errors_test.go │ ├── flow.go │ ├── flow_test.go │ ├── frame.go │ ├── frame_test.go │ ├── go16.go │ ├── go17.go │ ├── go17_not18.go │ ├── go18.go │ ├── go18_test.go │ ├── go19.go │ ├── go19_test.go │ ├── gotrack.go │ ├── gotrack_test.go │ ├── h2demo │ │ ├── .gitignore │ │ ├── Makefile │ │ ├── README │ │ ├── h2demo.go │ │ ├── launch.go │ │ ├── rootCA.key │ │ ├── rootCA.pem │ │ ├── rootCA.srl │ │ ├── server.crt │ │ ├── server.key │ │ └── tmpl.go │ ├── h2i │ │ ├── README.md │ │ └── h2i.go │ ├── headermap.go │ ├── hpack │ │ ├── encode.go │ │ ├── encode_test.go │ │ ├── hpack.go │ │ ├── hpack_test.go │ │ ├── huffman.go │ │ ├── tables.go │ │ └── tables_test.go │ ├── http2.go │ ├── http2_test.go │ ├── not_go16.go │ ├── not_go17.go │ ├── not_go18.go │ ├── not_go19.go │ ├── pipe.go │ ├── pipe_test.go │ ├── server.go │ ├── server_push_test.go │ ├── server_test.go │ ├── testdata │ │ └── draft-ietf-httpbis-http2.xml │ ├── transport.go │ ├── transport_test.go │ ├── write.go │ ├── writesched.go │ ├── writesched_priority.go │ ├── writesched_priority_test.go │ ├── writesched_random.go │ ├── writesched_random_test.go │ ├── writesched_test.go │ └── z_spec_test.go │ ├── icmp │ ├── dstunreach.go │ ├── echo.go │ ├── endpoint.go │ ├── example_test.go │ ├── extension.go │ ├── extension_test.go │ ├── helper_posix.go │ ├── interface.go │ ├── ipv4.go │ ├── ipv4_test.go │ ├── ipv6.go │ ├── listen_posix.go │ ├── listen_stub.go │ ├── message.go │ ├── message_test.go │ ├── messagebody.go │ ├── mpls.go │ ├── multipart.go │ ├── multipart_test.go │ ├── packettoobig.go │ ├── paramprob.go │ ├── ping_test.go │ ├── sys_freebsd.go │ └── timeexceeded.go │ ├── idna │ ├── example_test.go │ ├── idna.go │ ├── idna_test.go │ ├── punycode.go │ ├── punycode_test.go │ ├── tables.go │ ├── trie.go │ └── trieval.go │ ├── internal │ ├── iana │ │ ├── const.go │ │ └── gen.go │ ├── nettest │ │ ├── helper_bsd.go │ │ ├── helper_nobsd.go │ │ ├── helper_posix.go │ │ ├── helper_stub.go │ │ ├── helper_unix.go │ │ ├── helper_windows.go │ │ ├── interface.go │ │ ├── rlimit.go │ │ └── stack.go │ ├── socket │ │ ├── cmsghdr.go │ │ ├── cmsghdr_bsd.go │ │ ├── cmsghdr_linux_32bit.go │ │ ├── cmsghdr_linux_64bit.go │ │ ├── cmsghdr_solaris_64bit.go │ │ ├── cmsghdr_stub.go │ │ ├── defs_darwin.go │ │ ├── defs_dragonfly.go │ │ ├── defs_freebsd.go │ │ ├── defs_linux.go │ │ ├── defs_netbsd.go │ │ ├── defs_openbsd.go │ │ ├── defs_solaris.go │ │ ├── error_unix.go │ │ ├── error_windows.go │ │ ├── iovec_32bit.go │ │ ├── iovec_64bit.go │ │ ├── iovec_solaris_64bit.go │ │ ├── iovec_stub.go │ │ ├── mmsghdr_stub.go │ │ ├── mmsghdr_unix.go │ │ ├── msghdr_bsd.go │ │ ├── msghdr_bsdvar.go │ │ ├── msghdr_linux.go │ │ ├── msghdr_linux_32bit.go │ │ ├── msghdr_linux_64bit.go │ │ ├── msghdr_openbsd.go │ │ ├── msghdr_solaris_64bit.go │ │ ├── msghdr_stub.go │ │ ├── rawconn.go │ │ ├── rawconn_mmsg.go │ │ ├── rawconn_msg.go │ │ ├── rawconn_nommsg.go │ │ ├── rawconn_nomsg.go │ │ ├── rawconn_stub.go │ │ ├── reflect.go │ │ ├── socket.go │ │ ├── socket_go1_9_test.go │ │ ├── socket_test.go │ │ ├── sys.go │ │ ├── sys_bsd.go │ │ ├── sys_bsdvar.go │ │ ├── sys_darwin.go │ │ ├── sys_dragonfly.go │ │ ├── sys_linux.go │ │ ├── sys_linux_386.go │ │ ├── sys_linux_386.s │ │ ├── sys_linux_amd64.go │ │ ├── sys_linux_arm.go │ │ ├── sys_linux_arm64.go │ │ ├── sys_linux_mips.go │ │ ├── sys_linux_mips64.go │ │ ├── sys_linux_mips64le.go │ │ ├── sys_linux_mipsle.go │ │ ├── sys_linux_ppc64.go │ │ ├── sys_linux_ppc64le.go │ │ ├── sys_linux_s390x.go │ │ ├── sys_linux_s390x.s │ │ ├── sys_netbsd.go │ │ ├── sys_posix.go │ │ ├── sys_solaris.go │ │ ├── sys_solaris_amd64.s │ │ ├── sys_stub.go │ │ ├── sys_unix.go │ │ ├── sys_windows.go │ │ ├── zsys_darwin_386.go │ │ ├── zsys_darwin_amd64.go │ │ ├── zsys_darwin_arm.go │ │ ├── zsys_dragonfly_amd64.go │ │ ├── zsys_freebsd_386.go │ │ ├── zsys_freebsd_amd64.go │ │ ├── zsys_freebsd_arm.go │ │ ├── zsys_linux_386.go │ │ ├── zsys_linux_amd64.go │ │ ├── zsys_linux_arm.go │ │ ├── zsys_linux_arm64.go │ │ ├── zsys_linux_mips.go │ │ ├── zsys_linux_mips64.go │ │ ├── zsys_linux_mips64le.go │ │ ├── zsys_linux_mipsle.go │ │ ├── zsys_linux_ppc64.go │ │ ├── zsys_linux_ppc64le.go │ │ ├── zsys_linux_s390x.go │ │ ├── zsys_netbsd_386.go │ │ ├── zsys_netbsd_amd64.go │ │ ├── zsys_netbsd_arm.go │ │ ├── zsys_openbsd_386.go │ │ ├── zsys_openbsd_amd64.go │ │ ├── zsys_openbsd_arm.go │ │ └── zsys_solaris_amd64.go │ └── timeseries │ │ ├── timeseries.go │ │ └── timeseries_test.go │ ├── ipv4 │ ├── batch.go │ ├── bpf_test.go │ ├── control.go │ ├── control_bsd.go │ ├── control_pktinfo.go │ ├── control_stub.go │ ├── control_test.go │ ├── control_unix.go │ ├── control_windows.go │ ├── defs_darwin.go │ ├── defs_dragonfly.go │ ├── defs_freebsd.go │ ├── defs_linux.go │ ├── defs_netbsd.go │ ├── defs_openbsd.go │ ├── defs_solaris.go │ ├── dgramopt.go │ ├── doc.go │ ├── endpoint.go │ ├── example_test.go │ ├── gen.go │ ├── genericopt.go │ ├── header.go │ ├── header_test.go │ ├── helper.go │ ├── iana.go │ ├── icmp.go │ ├── icmp_linux.go │ ├── icmp_stub.go │ ├── icmp_test.go │ ├── multicast_test.go │ ├── multicastlistener_test.go │ ├── multicastsockopt_test.go │ ├── packet.go │ ├── packet_go1_8.go │ ├── packet_go1_9.go │ ├── payload.go │ ├── payload_cmsg.go │ ├── payload_cmsg_go1_8.go │ ├── payload_cmsg_go1_9.go │ ├── payload_nocmsg.go │ ├── readwrite_go1_8_test.go │ ├── readwrite_go1_9_test.go │ ├── readwrite_test.go │ ├── sockopt.go │ ├── sockopt_posix.go │ ├── sockopt_stub.go │ ├── sys_asmreq.go │ ├── sys_asmreq_stub.go │ ├── sys_asmreqn.go │ ├── sys_asmreqn_stub.go │ ├── sys_bpf.go │ ├── sys_bpf_stub.go │ ├── sys_bsd.go │ ├── sys_darwin.go │ ├── sys_dragonfly.go │ ├── sys_freebsd.go │ ├── sys_linux.go │ ├── sys_solaris.go │ ├── sys_ssmreq.go │ ├── sys_ssmreq_stub.go │ ├── sys_stub.go │ ├── sys_windows.go │ ├── unicast_test.go │ ├── unicastsockopt_test.go │ ├── zsys_darwin.go │ ├── zsys_dragonfly.go │ ├── zsys_freebsd_386.go │ ├── zsys_freebsd_amd64.go │ ├── zsys_freebsd_arm.go │ ├── zsys_linux_386.go │ ├── zsys_linux_amd64.go │ ├── zsys_linux_arm.go │ ├── zsys_linux_arm64.go │ ├── zsys_linux_mips.go │ ├── zsys_linux_mips64.go │ ├── zsys_linux_mips64le.go │ ├── zsys_linux_mipsle.go │ ├── zsys_linux_ppc.go │ ├── zsys_linux_ppc64.go │ ├── zsys_linux_ppc64le.go │ ├── zsys_linux_s390x.go │ ├── zsys_netbsd.go │ ├── zsys_openbsd.go │ └── zsys_solaris.go │ ├── ipv6 │ ├── batch.go │ ├── bpf_test.go │ ├── control.go │ ├── control_rfc2292_unix.go │ ├── control_rfc3542_unix.go │ ├── control_stub.go │ ├── control_test.go │ ├── control_unix.go │ ├── control_windows.go │ ├── defs_darwin.go │ ├── defs_dragonfly.go │ ├── defs_freebsd.go │ ├── defs_linux.go │ ├── defs_netbsd.go │ ├── defs_openbsd.go │ ├── defs_solaris.go │ ├── dgramopt.go │ ├── doc.go │ ├── endpoint.go │ ├── example_test.go │ ├── gen.go │ ├── genericopt.go │ ├── header.go │ ├── header_test.go │ ├── helper.go │ ├── iana.go │ ├── icmp.go │ ├── icmp_bsd.go │ ├── icmp_linux.go │ ├── icmp_solaris.go │ ├── icmp_stub.go │ ├── icmp_test.go │ ├── icmp_windows.go │ ├── mocktransponder_test.go │ ├── multicast_test.go │ ├── multicastlistener_test.go │ ├── multicastsockopt_test.go │ ├── payload.go │ ├── payload_cmsg.go │ ├── payload_cmsg_go1_8.go │ ├── payload_cmsg_go1_9.go │ ├── payload_nocmsg.go │ ├── readwrite_go1_8_test.go │ ├── readwrite_go1_9_test.go │ ├── readwrite_test.go │ ├── sockopt.go │ ├── sockopt_posix.go │ ├── sockopt_stub.go │ ├── sockopt_test.go │ ├── sys_asmreq.go │ ├── sys_asmreq_stub.go │ ├── sys_bpf.go │ ├── sys_bpf_stub.go │ ├── sys_bsd.go │ ├── sys_darwin.go │ ├── sys_freebsd.go │ ├── sys_linux.go │ ├── sys_solaris.go │ ├── sys_ssmreq.go │ ├── sys_ssmreq_stub.go │ ├── sys_stub.go │ ├── sys_windows.go │ ├── unicast_test.go │ ├── unicastsockopt_test.go │ ├── zsys_darwin.go │ ├── zsys_dragonfly.go │ ├── zsys_freebsd_386.go │ ├── zsys_freebsd_amd64.go │ ├── zsys_freebsd_arm.go │ ├── zsys_linux_386.go │ ├── zsys_linux_amd64.go │ ├── zsys_linux_arm.go │ ├── zsys_linux_arm64.go │ ├── zsys_linux_mips.go │ ├── zsys_linux_mips64.go │ ├── zsys_linux_mips64le.go │ ├── zsys_linux_mipsle.go │ ├── zsys_linux_ppc.go │ ├── zsys_linux_ppc64.go │ ├── zsys_linux_ppc64le.go │ ├── zsys_linux_s390x.go │ ├── zsys_netbsd.go │ ├── zsys_openbsd.go │ └── zsys_solaris.go │ ├── lex │ └── httplex │ │ ├── httplex.go │ │ └── httplex_test.go │ ├── lif │ ├── address.go │ ├── address_test.go │ ├── binary.go │ ├── defs_solaris.go │ ├── lif.go │ ├── link.go │ ├── link_test.go │ ├── sys.go │ ├── sys_solaris_amd64.s │ ├── syscall.go │ └── zsys_solaris_amd64.go │ ├── nettest │ ├── conntest.go │ ├── conntest_go16.go │ ├── conntest_go17.go │ └── conntest_test.go │ ├── netutil │ ├── listen.go │ └── listen_test.go │ ├── proxy │ ├── direct.go │ ├── per_host.go │ ├── per_host_test.go │ ├── proxy.go │ ├── proxy_test.go │ └── socks5.go │ ├── publicsuffix │ ├── gen.go │ ├── list.go │ ├── list_test.go │ ├── table.go │ └── table_test.go │ ├── route │ ├── address.go │ ├── address_darwin_test.go │ ├── address_test.go │ ├── binary.go │ ├── defs_darwin.go │ ├── defs_dragonfly.go │ ├── defs_freebsd.go │ ├── defs_netbsd.go │ ├── defs_openbsd.go │ ├── interface.go │ ├── interface_announce.go │ ├── interface_classic.go │ ├── interface_freebsd.go │ ├── interface_multicast.go │ ├── interface_openbsd.go │ ├── message.go │ ├── message_darwin_test.go │ ├── message_freebsd_test.go │ ├── message_test.go │ ├── route.go │ ├── route_classic.go │ ├── route_openbsd.go │ ├── route_test.go │ ├── sys.go │ ├── sys_darwin.go │ ├── sys_dragonfly.go │ ├── sys_freebsd.go │ ├── sys_netbsd.go │ ├── sys_openbsd.go │ ├── syscall.go │ ├── zsys_darwin.go │ ├── zsys_dragonfly.go │ ├── zsys_freebsd_386.go │ ├── zsys_freebsd_amd64.go │ ├── zsys_freebsd_arm.go │ ├── zsys_netbsd.go │ └── zsys_openbsd.go │ ├── trace │ ├── events.go │ ├── histogram.go │ ├── histogram_test.go │ ├── trace.go │ ├── trace_go16.go │ ├── trace_go17.go │ └── trace_test.go │ ├── webdav │ ├── file.go │ ├── file_go1.6.go │ ├── file_go1.7.go │ ├── file_test.go │ ├── if.go │ ├── if_test.go │ ├── internal │ │ └── xml │ │ │ ├── README │ │ │ ├── atom_test.go │ │ │ ├── example_test.go │ │ │ ├── marshal.go │ │ │ ├── marshal_test.go │ │ │ ├── read.go │ │ │ ├── read_test.go │ │ │ ├── typeinfo.go │ │ │ ├── xml.go │ │ │ └── xml_test.go │ ├── litmus_test_server.go │ ├── lock.go │ ├── lock_test.go │ ├── prop.go │ ├── prop_test.go │ ├── webdav.go │ ├── webdav_test.go │ ├── xml.go │ └── xml_test.go │ ├── websocket │ ├── client.go │ ├── dial.go │ ├── dial_test.go │ ├── exampledial_test.go │ ├── examplehandler_test.go │ ├── hybi.go │ ├── hybi_test.go │ ├── server.go │ ├── websocket.go │ └── websocket_test.go │ └── xsrftoken │ ├── xsrf.go │ └── xsrf_test.go ├── vsphere-influxdb.go └── vsphere-influxdb.json.sample /.gitignore: -------------------------------------------------------------------------------- 1 | ### Basic ignore file 2 | 3 | # Binaries for programs and plugins 4 | vsphere-influxdb 5 | 6 | # Test binary, build with `go test -c` 7 | *.test 8 | 9 | # Output of the go coverage tool, specifically when used with LiteIDE 10 | *.out 11 | 12 | # Configuration file 13 | vsphere-influxdb.json 14 | 15 | # Vim swap files 16 | *.swp 17 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | sudo: required 3 | go: 4 | - 1.9 5 | env: 6 | - PATH=/home/travis/gopath/bin:$PATH 7 | before_install: 8 | - sudo apt-get -qq update 9 | - sudo apt-get install -y ruby ruby-dev build-essential rpm 10 | - go get -u github.com/golang/dep/cmd/dep 11 | - go get -u github.com/alecthomas/gometalinter 12 | install: 13 | - dep ensure 14 | before_script: 15 | - gometalinter --install 16 | # - gometalinter --vendor ./... 17 | script: 18 | - git status 19 | after_success: 20 | # - gem install --no-ri --no-rdoc fpm 21 | - test -n "$TRAVIS_TAG" && curl -sL https://git.io/goreleaser | bash 22 | 23 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM golang:1.12-alpine3.10 as builder 2 | 3 | WORKDIR /go/src/vsphere-influxdb-go 4 | COPY . . 5 | RUN apk --update add --virtual build-deps git 6 | RUN go get -d -v ./... 7 | RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo 8 | 9 | FROM alpine:3.10 10 | RUN apk update \ 11 | && apk upgrade \ 12 | && apk add ca-certificates \ 13 | && addgroup -S spock && adduser -S spock -G spock 14 | COPY --from=0 /go/src/vsphere-influxdb-go/vsphere-influxdb-go /vsphere-influxdb-go 15 | 16 | USER spock 17 | 18 | CMD ["/vsphere-influxdb-go"] 19 | -------------------------------------------------------------------------------- /Gopkg.toml: -------------------------------------------------------------------------------- 1 | 2 | # Gopkg.toml example 3 | # 4 | # Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md 5 | # for detailed Gopkg.toml documentation. 6 | # 7 | # required = ["github.com/user/thing/cmd/thing"] 8 | # ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"] 9 | # 10 | # [[constraint]] 11 | # name = "github.com/user/project" 12 | # version = "1.0.0" 13 | # 14 | # [[constraint]] 15 | # name = "github.com/user/project2" 16 | # branch = "dev" 17 | # source = "github.com/myfork/project2" 18 | # 19 | # [[override]] 20 | # name = "github.com/x/y" 21 | # version = "2.4.0" 22 | 23 | 24 | [[constraint]] 25 | name = "github.com/davecgh/go-spew" 26 | version = "1.1.0" 27 | 28 | [[constraint]] 29 | name = "github.com/influxdata/influxdb" 30 | version = "1.3.6" 31 | 32 | [[constraint]] 33 | name = "github.com/vmware/govmomi" 34 | version = "0.15.0" 35 | 36 | [[constraint]] 37 | branch = "master" 38 | name = "golang.org/x/net" 39 | -------------------------------------------------------------------------------- /tools/README.md: -------------------------------------------------------------------------------- 1 | # Change vCenter metric collection level 2 | 3 | ``` 4 | git clone https://github.com/Oxalide/vsphere-influxdb-go.git 5 | pip install -r tools/requirements.txt 6 | ./tools/change_metric_collection_level.py 7 | ``` 8 | -------------------------------------------------------------------------------- /tools/requirements.txt: -------------------------------------------------------------------------------- 1 | pyVmomi 2 | requests 3 | argparse 4 | -------------------------------------------------------------------------------- /vendor/github.com/davecgh/go-spew/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | -------------------------------------------------------------------------------- /vendor/github.com/davecgh/go-spew/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - 1.5.4 4 | - 1.6.3 5 | - 1.7 6 | install: 7 | - go get -v golang.org/x/tools/cmd/cover 8 | script: 9 | - go test -v -tags=safe ./spew 10 | - go test -v -tags=testcgo ./spew -covermode=count -coverprofile=profile.cov 11 | after_success: 12 | - go get -v github.com/mattn/goveralls 13 | - export PATH=$PATH:$HOME/gopath/bin 14 | - goveralls -coverprofile=profile.cov -service=travis-ci 15 | -------------------------------------------------------------------------------- /vendor/github.com/davecgh/go-spew/LICENSE: -------------------------------------------------------------------------------- 1 | ISC License 2 | 3 | Copyright (c) 2012-2016 Dave Collins 4 | 5 | Permission to use, copy, modify, and distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | -------------------------------------------------------------------------------- /vendor/github.com/davecgh/go-spew/cov_report.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # This script uses gocov to generate a test coverage report. 4 | # The gocov tool my be obtained with the following command: 5 | # go get github.com/axw/gocov/gocov 6 | # 7 | # It will be installed to $GOPATH/bin, so ensure that location is in your $PATH. 8 | 9 | # Check for gocov. 10 | if ! type gocov >/dev/null 2>&1; then 11 | echo >&2 "This script requires the gocov tool." 12 | echo >&2 "You may obtain it with the following command:" 13 | echo >&2 "go get github.com/axw/gocov/gocov" 14 | exit 1 15 | fi 16 | 17 | # Only run the cgo tests if gcc is installed. 18 | if type gcc >/dev/null 2>&1; then 19 | (cd spew && gocov test -tags testcgo | gocov report) 20 | else 21 | (cd spew && gocov test | gocov report) 22 | fi 23 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/.dockerignore: -------------------------------------------------------------------------------- 1 | build 2 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ###### Required for all non-trivial PRs 2 | - [ ] Rebased/mergable 3 | - [ ] Tests pass 4 | - [ ] CHANGELOG.md updated 5 | - [ ] Sign [CLA](https://influxdata.com/community/cla/) (if not already signed) 6 | 7 | ###### Required only if applicable 8 | _You can erase any checkboxes below this note if they are not applicable to your Pull Request._ 9 | - [ ] [InfluxQL Spec](https://github.com/influxdata/influxdb/blob/master/influxql/README.md) updated 10 | - [ ] Provide example syntax 11 | - [ ] Update man page when modifying a command 12 | - [ ] Config changes: update sample config (`etc/config.sample.toml`), server `NewDemoConfig` method, and `Diagnostics` methods reporting config settings, if necessary 13 | - [ ] [InfluxData Documentation](https://github.com/influxdata/docs.influxdata.com): issue filed or pull request submitted \ 14 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/.hooks/pre-commit: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | fmtcount=`git ls-files | grep '.go$' | xargs gofmt -l 2>&1 | wc -l` 4 | if [ $fmtcount -gt 0 ]; then 5 | echo "Some files aren't formatted, please run 'go fmt ./...' to format your source code before committing" 6 | exit 1 7 | fi 8 | 9 | vetcount=`go tool vet ./ 2>&1 | wc -l` 10 | if [ $vetcount -gt 0 ]; then 11 | echo "Some files aren't passing vet heuristics, please run 'go vet ./...' to see the errors it flags and correct your source code before committing" 12 | exit 1 13 | fi 14 | exit 0 15 | 16 | # Ensure FIXME lines are removed before commit. 17 | fixme_lines=$(git diff --cached | grep ^+ | grep -v pre-commit | grep FIXME | sed 's_^+\s*__g') 18 | if [ "$fixme_lines" != "" ]; then 19 | echo "Please remove the following lines:" 20 | echo -e "$fixme_lines" 21 | exit 1 22 | fi 23 | 24 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/.mention-bot: -------------------------------------------------------------------------------- 1 | { 2 | "maxReviewers": 3, 3 | "fileBlacklist": ["CHANGELOG.md"], 4 | "userBlacklist": ["pauldix", "toddboom", "aviau", "mark-rushakoff"], 5 | "requiredOrgs": ["influxdata"] 6 | } 7 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/Dockerfile_build_ubuntu32: -------------------------------------------------------------------------------- 1 | FROM ioft/i386-ubuntu:14.04 2 | 3 | RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ 4 | python-software-properties \ 5 | software-properties-common \ 6 | wget \ 7 | git \ 8 | mercurial \ 9 | make \ 10 | ruby \ 11 | ruby-dev \ 12 | rpm \ 13 | zip \ 14 | python \ 15 | python-boto 16 | 17 | RUN gem install fpm 18 | 19 | # Install go 20 | ENV GOPATH /root/go 21 | ENV GO_VERSION 1.8.3 22 | ENV GO_ARCH 386 23 | RUN wget https://storage.googleapis.com/golang/go${GO_VERSION}.linux-${GO_ARCH}.tar.gz; \ 24 | tar -C /usr/local/ -xf /go${GO_VERSION}.linux-${GO_ARCH}.tar.gz ; \ 25 | rm /go${GO_VERSION}.linux-${GO_ARCH}.tar.gz 26 | ENV PATH /usr/local/go/bin:$PATH 27 | 28 | ENV PROJECT_DIR $GOPATH/src/github.com/influxdata/influxdb 29 | ENV PATH $GOPATH/bin:$PATH 30 | RUN mkdir -p $PROJECT_DIR 31 | WORKDIR $PROJECT_DIR 32 | 33 | VOLUME $PROJECT_DIR 34 | 35 | ENTRYPOINT [ "/root/go/src/github.com/influxdata/influxdb/build.py" ] 36 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/Dockerfile_build_ubuntu64: -------------------------------------------------------------------------------- 1 | FROM ubuntu:trusty 2 | 3 | RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ 4 | python-software-properties \ 5 | software-properties-common \ 6 | wget \ 7 | git \ 8 | mercurial \ 9 | make \ 10 | ruby \ 11 | ruby-dev \ 12 | rpm \ 13 | zip \ 14 | python \ 15 | python-boto \ 16 | asciidoc \ 17 | xmlto \ 18 | docbook-xsl 19 | 20 | RUN gem install fpm 21 | 22 | # Install go 23 | ENV GOPATH /root/go 24 | ENV GO_VERSION 1.8.3 25 | ENV GO_ARCH amd64 26 | RUN wget https://storage.googleapis.com/golang/go${GO_VERSION}.linux-${GO_ARCH}.tar.gz; \ 27 | tar -C /usr/local/ -xf /go${GO_VERSION}.linux-${GO_ARCH}.tar.gz ; \ 28 | rm /go${GO_VERSION}.linux-${GO_ARCH}.tar.gz 29 | ENV PATH /usr/local/go/bin:$PATH 30 | 31 | ENV PROJECT_DIR $GOPATH/src/github.com/influxdata/influxdb 32 | ENV PATH $GOPATH/bin:$PATH 33 | RUN mkdir -p $PROJECT_DIR 34 | WORKDIR $PROJECT_DIR 35 | 36 | VOLUME $PROJECT_DIR 37 | 38 | ENTRYPOINT [ "/root/go/src/github.com/influxdata/influxdb/build.py" ] 39 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/Dockerfile_test_ubuntu32: -------------------------------------------------------------------------------- 1 | FROM 32bit/ubuntu:14.04 2 | 3 | RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y python-software-properties software-properties-common git 4 | RUN add-apt-repository ppa:evarlast/golang1.4 5 | RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y -o Dpkg::Options::="--force-overwrite" golang-go 6 | 7 | ENV GOPATH=/root/go 8 | RUN mkdir -p /root/go/src/github.com/influxdata/influxdb 9 | RUN mkdir -p /tmp/artifacts 10 | 11 | VOLUME /root/go/src/github.com/influxdata/influxdb 12 | VOLUME /tmp/artifacts 13 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/Makefile: -------------------------------------------------------------------------------- 1 | PACKAGES=$(shell find . -name '*.go' -print0 | xargs -0 -n1 dirname | sort --unique) 2 | 3 | default: 4 | 5 | metalint: deadcode cyclo aligncheck defercheck structcheck lint errcheck 6 | 7 | deadcode: 8 | @deadcode $(PACKAGES) 2>&1 9 | 10 | cyclo: 11 | @gocyclo -over 10 $(PACKAGES) 12 | 13 | aligncheck: 14 | @aligncheck $(PACKAGES) 15 | 16 | defercheck: 17 | @defercheck $(PACKAGES) 18 | 19 | 20 | structcheck: 21 | @structcheck $(PACKAGES) 22 | 23 | lint: 24 | @for pkg in $(PACKAGES); do golint $$pkg; done 25 | 26 | errcheck: 27 | @for pkg in $(PACKAGES); do \ 28 | errcheck -ignorepkg=bytes,fmt -ignore=":(Rollback|Close)" $$pkg \ 29 | done 30 | 31 | tools: 32 | go get github.com/remyoudompheng/go-misc/deadcode 33 | go get github.com/alecthomas/gocyclo 34 | go get github.com/opennota/check/... 35 | go get github.com/golang/lint/golint 36 | go get github.com/kisielk/errcheck 37 | go get github.com/sparrc/gdm 38 | 39 | .PHONY: default,metalint,deadcode,cyclo,aligncheck,defercheck,structcheck,lint,errcheck,tools 40 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/TODO.md: -------------------------------------------------------------------------------- 1 | # TODO 2 | 3 | ## v2 4 | 5 | TODO list for v2. Here is a list of things we want to add to v1, but can't because they would be a breaking change. 6 | 7 | - [#1834](https://github.com/influxdata/influxdb/issues/1834): Disallow using time as a tag key or field key. 8 | - [#2124](https://github.com/influxdata/influxdb/issues/2124): Prohibit writes with precision, but without an explicit timestamp. 9 | - [#4461](https://github.com/influxdata/influxdb/issues/4461): Change default time boundaries. 10 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/appveyor.yml: -------------------------------------------------------------------------------- 1 | version: 0.{build} 2 | pull_requests: 3 | do_not_increment_build_number: true 4 | branches: 5 | only: 6 | - master 7 | 8 | os: Windows Server 2012 R2 9 | 10 | # Custom clone folder (variables are not expanded here). 11 | clone_folder: c:\gopath\src\github.com\influxdata\influxdb 12 | 13 | # Environment variables 14 | environment: 15 | GOROOT: C:\go17 16 | GOPATH: C:\gopath 17 | 18 | # Scripts that run after cloning repository 19 | install: 20 | - set PATH=%GOROOT%\bin;%GOPATH%\bin;%PATH% 21 | - rmdir c:\go /s /q 22 | - echo %PATH% 23 | - echo %GOPATH% 24 | - cd C:\gopath\src\github.com\influxdata\influxdb 25 | - go version 26 | - go env 27 | - go get github.com/sparrc/gdm 28 | - cd C:\gopath\src\github.com\influxdata\influxdb 29 | - gdm restore 30 | 31 | # To run your custom scripts instead of automatic MSBuild 32 | build_script: 33 | - go get -t -v ./... 34 | - go test -race -v ./... 35 | 36 | # To disable deployment 37 | deploy: off 38 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Run the build utility via Docker 3 | 4 | set -e 5 | 6 | # Make sure our working dir is the dir of the script 7 | DIR=$(cd $(dirname ${BASH_SOURCE[0]}) && pwd) 8 | cd $DIR 9 | 10 | 11 | # Build new docker image 12 | docker build -f Dockerfile_build_ubuntu64 -t influxdb-builder $DIR 13 | echo "Running build.py" 14 | # Run docker 15 | docker run --rm \ 16 | -e AWS_ACCESS_KEY_ID="$AWS_ACCESS_KEY_ID" \ 17 | -e AWS_SECRET_ACCESS_KEY="$AWS_SECRET_ACCESS_KEY" \ 18 | -v $HOME/.aws.conf:/root/.aws.conf \ 19 | -v $DIR:/root/go/src/github.com/influxdata/influxdb \ 20 | influxdb-builder \ 21 | "$@" 22 | 23 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/cmd/influx/cli/parser.go: -------------------------------------------------------------------------------- 1 | package cli 2 | 3 | import ( 4 | "bytes" 5 | "fmt" 6 | ) 7 | 8 | func parseDatabaseAndRetentionPolicy(stmt []byte) (string, string, error) { 9 | var db, rp []byte 10 | var quoted bool 11 | var seperatorCount int 12 | 13 | stmt = bytes.TrimSpace(stmt) 14 | 15 | for _, b := range stmt { 16 | if b == '"' { 17 | quoted = !quoted 18 | continue 19 | } 20 | if b == '.' && !quoted { 21 | seperatorCount++ 22 | if seperatorCount > 1 { 23 | return "", "", fmt.Errorf("unable to parse database and retention policy from %s", string(stmt)) 24 | } 25 | continue 26 | } 27 | if seperatorCount == 1 { 28 | rp = append(rp, b) 29 | continue 30 | } 31 | db = append(db, b) 32 | } 33 | return string(db), string(rp), nil 34 | } 35 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/cmd/influx_inspect/dumptsm/dumptsm_test.go: -------------------------------------------------------------------------------- 1 | package dumptsm_test 2 | 3 | // TODO: write some tests 4 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/cmd/influx_inspect/help/help_test.go: -------------------------------------------------------------------------------- 1 | package help_test 2 | 3 | // TODO: write some tests 4 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/cmd/influx_inspect/report/report_test.go: -------------------------------------------------------------------------------- 1 | package report_test 2 | 3 | // TODO: write some tests 4 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/cmd/influx_inspect/verify/verify_test.go: -------------------------------------------------------------------------------- 1 | package verify_test 2 | 3 | // TODO: write some tests 4 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/cmd/parse.go: -------------------------------------------------------------------------------- 1 | // Package cmd is the root package of the various command-line utilities for InfluxDB. 2 | package cmd 3 | 4 | import "strings" 5 | 6 | // ParseCommandName extracts the command name and args from the args list. 7 | func ParseCommandName(args []string) (string, []string) { 8 | // Retrieve command name as first argument. 9 | var name string 10 | if len(args) > 0 { 11 | if !strings.HasPrefix(args[0], "-") { 12 | name = args[0] 13 | } else if args[0] == "-h" || args[0] == "-help" || args[0] == "--help" { 14 | // Special case -h immediately following binary name 15 | name = "help" 16 | } 17 | } 18 | 19 | // If command is "help" and has an argument then rewrite args to use "-h". 20 | if name == "help" && len(args) > 2 && !strings.HasPrefix(args[1], "-") { 21 | return args[1], []string{"-h"} 22 | } 23 | 24 | // If a named command is specified then return it with its arguments. 25 | if name != "" { 26 | return name, args[1:] 27 | } 28 | return "", args 29 | } 30 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/coordinator/config_test.go: -------------------------------------------------------------------------------- 1 | package coordinator_test 2 | 3 | import ( 4 | "testing" 5 | "time" 6 | 7 | "github.com/BurntSushi/toml" 8 | "github.com/influxdata/influxdb/coordinator" 9 | ) 10 | 11 | func TestConfig_Parse(t *testing.T) { 12 | // Parse configuration. 13 | var c coordinator.Config 14 | if _, err := toml.Decode(` 15 | write-timeout = "20s" 16 | `, &c); err != nil { 17 | t.Fatal(err) 18 | } 19 | 20 | // Validate configuration. 21 | if time.Duration(c.WriteTimeout) != 20*time.Second { 22 | t.Fatalf("unexpected write timeout s: %s", c.WriteTimeout) 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/etc/burn-in/.rvmrc: -------------------------------------------------------------------------------- 1 | rvm use ruby-2.1.0@burn-in --create 2 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/etc/burn-in/Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | gem "colorize" 4 | gem "influxdb" 5 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/etc/burn-in/Gemfile.lock: -------------------------------------------------------------------------------- 1 | GEM 2 | remote: https://rubygems.org/ 3 | specs: 4 | colorize (0.6.0) 5 | influxdb (0.0.16) 6 | json 7 | json (1.8.1) 8 | 9 | PLATFORMS 10 | ruby 11 | 12 | DEPENDENCIES 13 | colorize 14 | influxdb 15 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/etc/burn-in/log.rb: -------------------------------------------------------------------------------- 1 | module Log 2 | def self.info(msg) 3 | print Time.now.strftime("%r") + " | " 4 | puts msg.to_s.colorize(:yellow) 5 | end 6 | 7 | def self.success(msg) 8 | print Time.now.strftime("%r") + " | " 9 | puts msg.to_s.colorize(:green) 10 | end 11 | 12 | def self.failure(msg) 13 | print Time.now.strftime("%r") + " | " 14 | puts msg.to_s.colorize(:red) 15 | end 16 | 17 | def self.log(msg) 18 | print Time.now.strftime("%r") + " | " 19 | puts msg.to_s 20 | end 21 | end 22 | 23 | 24 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/etc/burn-in/random_gaussian.rb: -------------------------------------------------------------------------------- 1 | class RandomGaussian 2 | def initialize(mean, stddev, rand_helper = lambda { Kernel.rand }) 3 | @rand_helper = rand_helper 4 | @mean = mean 5 | @stddev = stddev 6 | @valid = false 7 | @next = 0 8 | end 9 | 10 | def rand 11 | if @valid then 12 | @valid = false 13 | return @next 14 | else 15 | @valid = true 16 | x, y = self.class.gaussian(@mean, @stddev, @rand_helper) 17 | @next = y 18 | return x 19 | end 20 | end 21 | 22 | private 23 | def self.gaussian(mean, stddev, rand) 24 | theta = 2 * Math::PI * rand.call 25 | rho = Math.sqrt(-2 * Math.log(1 - rand.call)) 26 | scale = stddev * rho 27 | x = mean + scale * Math.cos(theta) 28 | y = mean + scale * Math.sin(theta) 29 | return x, y 30 | end 31 | end 32 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/etc/burn-in/random_points.rb: -------------------------------------------------------------------------------- 1 | require "influxdb" 2 | 3 | ONE_WEEK_IN_SECONDS = 7*24*60*60 4 | NUM_POINTS = 10_000 5 | BATCHES = 100 6 | 7 | master = InfluxDB::Client.new 8 | master.delete_database("ctx") rescue nil 9 | master.create_database("ctx") 10 | 11 | influxdb = InfluxDB::Client.new "ctx" 12 | influxdb.time_precision = "s" 13 | 14 | names = ["foo", "bar", "baz", "quu", "qux"] 15 | 16 | st = Time.now 17 | BATCHES.times do |m| 18 | points = [] 19 | 20 | puts "Writing #{NUM_POINTS} points, time ##{m}.." 21 | NUM_POINTS.times do |n| 22 | timestamp = Time.now.to_i - rand(ONE_WEEK_IN_SECONDS) 23 | points << {value: names.sample, time: timestamp} 24 | end 25 | 26 | influxdb.write_point("ct1", points) 27 | end 28 | puts st 29 | puts Time.now 30 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/gobuild.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # This script run inside the Dockerfile_build_ubuntu64_git container and 3 | # gets the latests Go source code and compiles it. 4 | # Then passes control over to the normal build.py script 5 | 6 | set -e 7 | 8 | cd /go/src 9 | git fetch --all 10 | git checkout $GO_CHECKOUT 11 | # Merge in recent changes if we are on a branch 12 | # if we checked out a tag just ignore the error 13 | git pull || true 14 | ./make.bash 15 | 16 | # Run normal build.py 17 | cd "$PROJECT_DIR" 18 | exec ./build.py "$@" 19 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/influxdb.go: -------------------------------------------------------------------------------- 1 | // Package influxdb is the root package of InfluxDB, 2 | // the scalable datastore for metrics, events, and real-time analytics. 3 | // 4 | // If you're looking for the Go HTTP client for InfluxDB, 5 | // see package github.com/influxdata/influxdb/client/v2. 6 | package influxdb // import "github.com/influxdata/influxdb" 7 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/influxql/cast.go: -------------------------------------------------------------------------------- 1 | package influxql 2 | 3 | func castToFloat(v interface{}) float64 { 4 | switch v := v.(type) { 5 | case float64: 6 | return v 7 | case int64: 8 | return float64(v) 9 | default: 10 | return float64(0) 11 | } 12 | } 13 | 14 | func castToInteger(v interface{}) int64 { 15 | switch v := v.(type) { 16 | case float64: 17 | return int64(v) 18 | case int64: 19 | return v 20 | default: 21 | return int64(0) 22 | } 23 | } 24 | 25 | func castToString(v interface{}) string { 26 | switch v := v.(type) { 27 | case string: 28 | return v 29 | default: 30 | return "" 31 | } 32 | } 33 | 34 | func castToBoolean(v interface{}) bool { 35 | switch v := v.(type) { 36 | case bool: 37 | return v 38 | default: 39 | return false 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/influxql/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Package influxql implements a parser for the InfluxDB query language. 3 | 4 | InfluxQL is a DML and DDL language for the InfluxDB time series database. 5 | It provides the ability to query for aggregate statistics as well as create 6 | and configure the InfluxDB server. 7 | 8 | See https://docs.influxdata.com/influxdb/latest/query_language/ 9 | for a reference on using InfluxQL. 10 | 11 | */ 12 | package influxql 13 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/influxql/influxql.go: -------------------------------------------------------------------------------- 1 | package influxql // import "github.com/influxdata/influxdb/influxql" 2 | 3 | //go:generate tmpl -data=@tmpldata iterator.gen.go.tmpl 4 | //go:generate tmpl -data=@tmpldata point.gen.go.tmpl 5 | //go:generate tmpl -data=@tmpldata functions.gen.go.tmpl 6 | 7 | //go:generate protoc --gogo_out=. internal/internal.proto 8 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/influxql/monitor.go: -------------------------------------------------------------------------------- 1 | package influxql 2 | 3 | import "time" 4 | 5 | // PointLimitMonitor is a query monitor that exits when the number of points 6 | // emitted exceeds a threshold. 7 | func PointLimitMonitor(itrs Iterators, interval time.Duration, limit int) QueryMonitorFunc { 8 | return func(closing <-chan struct{}) error { 9 | ticker := time.NewTicker(interval) 10 | defer ticker.Stop() 11 | for { 12 | select { 13 | case <-ticker.C: 14 | stats := itrs.Stats() 15 | if stats.PointN >= limit { 16 | return ErrMaxSelectPointsLimitExceeded(stats.PointN, limit) 17 | } 18 | case <-closing: 19 | return nil 20 | } 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/influxql/tmpldata: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "Name":"Float", 4 | "name":"float", 5 | "Type":"float64", 6 | "Nil":"0", 7 | "Zero":"float64(0)" 8 | }, 9 | { 10 | "Name":"Integer", 11 | "name":"integer", 12 | "Type":"int64", 13 | "Nil":"0", 14 | "Zero":"int64(0)" 15 | }, 16 | { 17 | "Name":"String", 18 | "name":"string", 19 | "Type":"string", 20 | "Nil":"\"\"", 21 | "Zero":"\"\"" 22 | }, 23 | { 24 | "Name":"Boolean", 25 | "name":"boolean", 26 | "Type":"bool", 27 | "Nil":"false", 28 | "Zero":"false" 29 | } 30 | ] 31 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/man/Makefile: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | 3 | DESTDIR = /usr/local 4 | 5 | MAN1_TXT = 6 | MAN1_TXT += influxd.txt 7 | MAN1_TXT += influxd-backup.txt 8 | MAN1_TXT += influxd-config.txt 9 | MAN1_TXT += influxd-restore.txt 10 | MAN1_TXT += influxd-run.txt 11 | MAN1_TXT += influxd-version.txt 12 | MAN1_TXT += influx.txt 13 | MAN1_TXT += influx_inspect.txt 14 | MAN1_TXT += influx_stress.txt 15 | MAN1_TXT += influx_tsm.txt 16 | 17 | MAN_TXT = $(MAN1_TXT) 18 | MAN_XML = $(patsubst %.txt,%.xml,$(MAN_TXT)) 19 | 20 | DOC_MAN1 = $(patsubst %.txt,%.1,$(MAN1_TXT)) 21 | 22 | build: $(DOC_MAN1) 23 | 24 | install: build 25 | @echo ' INSTALL $(DOC_MAN1)' && \ 26 | mkdir -p $(DESTDIR)/share/man/man1 && \ 27 | install -m 0644 $(DOC_MAN1) $(DESTDIR)/share/man/man1 28 | 29 | clean: 30 | rm -f $(MAN_XML) $(DOC_MAN1) 31 | 32 | %.xml : %.txt 33 | @echo ' ASCIIDOC $@' && rm -f $@+ && \ 34 | asciidoc -d manpage -b docbook -o $@+ $< && \ 35 | mv $@+ $@ 36 | 37 | %.1 : %.xml 38 | @echo ' XMLTO $@' && \ 39 | xmlto man $< 2> /dev/null 40 | 41 | .PHONY: build install clean 42 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/man/footer.txt: -------------------------------------------------------------------------------- 1 | BUGS 2 | ---- 3 | Report bugs to the GitHub issue tracker . 4 | 5 | AUTHORS 6 | ------- 7 | InfluxDB is written and maintained by InfluxData . 8 | 9 | COPYRIGHT 10 | --------- 11 | InfluxDB is released under the MIT license. 12 | 13 | This man page is released under Creative Commons Attribution 4.0 International License. 14 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/man/influxd-backup.txt: -------------------------------------------------------------------------------- 1 | influxd-backup(1) 2 | ================= 3 | 4 | NAME 5 | ---- 6 | influxd-backup - Downloads a snapshot of a data node and saves it to disk 7 | 8 | SYNOPSIS 9 | -------- 10 | 'influxd backup' [options] 11 | 12 | DESCRIPTION 13 | ----------- 14 | Downloads a snapshot of a data node and saves it to disk. 15 | 16 | OPTIONS 17 | ------- 18 | -host :: 19 | The host to connect to and perform a snapshot of. Defaults to '127.0.0.1:8088'. 20 | 21 | -database :: 22 | The database to backup. Required. 23 | 24 | -retention :: 25 | The retention policy to backup. Optional. 26 | 27 | -shard :: 28 | The shard id to backup. Optional. If specified, '-retention ' is required. 29 | 30 | -since <2015-12-24T08:12:13>:: 31 | Do an incremental backup since the passed in time. The time needs to be in the RFC3339 format. Optional. 32 | 33 | SEE ALSO 34 | -------- 35 | *influxd-restore*(1) 36 | 37 | include::footer.txt[] 38 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/man/influxd-version.txt: -------------------------------------------------------------------------------- 1 | influxd-version(1) 2 | ================== 3 | 4 | NAME 5 | ---- 6 | influxd-version - Display the version of influxdb 7 | 8 | SYNOPSIS 9 | -------- 10 | [verse] 11 | 'influxd version' 12 | 13 | DESCRIPTION 14 | ----------- 15 | 'influxd version' will output the version of the InfluxDB server. 16 | 17 | include::footer.txt[] 18 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/models/inline_fnv.go: -------------------------------------------------------------------------------- 1 | package models // import "github.com/influxdata/influxdb/models" 2 | 3 | // from stdlib hash/fnv/fnv.go 4 | const ( 5 | prime64 = 1099511628211 6 | offset64 = 14695981039346656037 7 | ) 8 | 9 | // InlineFNV64a is an alloc-free port of the standard library's fnv64a. 10 | // See https://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function. 11 | type InlineFNV64a uint64 12 | 13 | // NewInlineFNV64a returns a new instance of InlineFNV64a. 14 | func NewInlineFNV64a() InlineFNV64a { 15 | return offset64 16 | } 17 | 18 | // Write adds data to the running hash. 19 | func (s *InlineFNV64a) Write(data []byte) (int, error) { 20 | hash := uint64(*s) 21 | for _, c := range data { 22 | hash ^= uint64(c) 23 | hash *= prime64 24 | } 25 | *s = InlineFNV64a(hash) 26 | return len(data), nil 27 | } 28 | 29 | // Sum64 returns the uint64 of the current resulting hash. 30 | func (s *InlineFNV64a) Sum64() uint64 { 31 | return uint64(*s) 32 | } 33 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/models/inline_fnv_test.go: -------------------------------------------------------------------------------- 1 | package models_test 2 | 3 | import ( 4 | "hash/fnv" 5 | "testing" 6 | "testing/quick" 7 | 8 | "github.com/influxdata/influxdb/models" 9 | ) 10 | 11 | func TestInlineFNV64aEquivalenceFuzz(t *testing.T) { 12 | f := func(data []byte) bool { 13 | stdlibFNV := fnv.New64a() 14 | stdlibFNV.Write(data) 15 | want := stdlibFNV.Sum64() 16 | 17 | inlineFNV := models.NewInlineFNV64a() 18 | inlineFNV.Write(data) 19 | got := inlineFNV.Sum64() 20 | 21 | return want == got 22 | } 23 | cfg := &quick.Config{ 24 | MaxCount: 10000, 25 | } 26 | if err := quick.Check(f, cfg); err != nil { 27 | t.Fatal(err) 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/models/points_internal_test.go: -------------------------------------------------------------------------------- 1 | package models 2 | 3 | import "testing" 4 | 5 | func TestMarshalPointNoFields(t *testing.T) { 6 | points, err := ParsePointsString("m,k=v f=0i") 7 | if err != nil { 8 | t.Fatal(err) 9 | } 10 | 11 | // It's unclear how this can ever happen, but we've observed points that were marshalled without any fields. 12 | points[0].(*point).fields = []byte{} 13 | 14 | if _, err := points[0].MarshalBinary(); err != ErrPointMustHaveAField { 15 | t.Fatalf("got error %v, exp %v", err, ErrPointMustHaveAField) 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/monitor/build_info.go: -------------------------------------------------------------------------------- 1 | package monitor 2 | 3 | import "github.com/influxdata/influxdb/monitor/diagnostics" 4 | 5 | // build holds information of the build of the current executable. 6 | type build struct { 7 | Version string 8 | Commit string 9 | Branch string 10 | Time string 11 | } 12 | 13 | func (b *build) Diagnostics() (*diagnostics.Diagnostics, error) { 14 | d := map[string]interface{}{ 15 | "Version": b.Version, 16 | "Commit": b.Commit, 17 | "Branch": b.Branch, 18 | "Build Time": b.Time, 19 | } 20 | 21 | return diagnostics.RowFromMap(d), nil 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/monitor/go_runtime.go: -------------------------------------------------------------------------------- 1 | package monitor 2 | 3 | import ( 4 | "runtime" 5 | 6 | "github.com/influxdata/influxdb/monitor/diagnostics" 7 | ) 8 | 9 | // goRuntime captures Go runtime diagnostics. 10 | type goRuntime struct{} 11 | 12 | func (g *goRuntime) Diagnostics() (*diagnostics.Diagnostics, error) { 13 | d := map[string]interface{}{ 14 | "GOARCH": runtime.GOARCH, 15 | "GOOS": runtime.GOOS, 16 | "GOMAXPROCS": runtime.GOMAXPROCS(-1), 17 | "version": runtime.Version(), 18 | } 19 | 20 | return diagnostics.RowFromMap(d), nil 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/monitor/network.go: -------------------------------------------------------------------------------- 1 | package monitor 2 | 3 | import ( 4 | "os" 5 | 6 | "github.com/influxdata/influxdb/monitor/diagnostics" 7 | ) 8 | 9 | // network captures network diagnostics. 10 | type network struct{} 11 | 12 | func (n *network) Diagnostics() (*diagnostics.Diagnostics, error) { 13 | h, err := os.Hostname() 14 | if err != nil { 15 | return nil, err 16 | } 17 | 18 | d := map[string]interface{}{ 19 | "hostname": h, 20 | } 21 | 22 | return diagnostics.RowFromMap(d), nil 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/monitor/reporter.go: -------------------------------------------------------------------------------- 1 | package monitor 2 | 3 | import "github.com/influxdata/influxdb/models" 4 | 5 | // Reporter is an interface for gathering internal statistics. 6 | type Reporter interface { 7 | // Statistics returns the statistics for the reporter, 8 | // with the given tags merged into the result. 9 | Statistics(tags map[string]string) []models.Statistic 10 | } 11 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/monitor/system.go: -------------------------------------------------------------------------------- 1 | package monitor 2 | 3 | import ( 4 | "os" 5 | "time" 6 | 7 | "github.com/influxdata/influxdb/monitor/diagnostics" 8 | ) 9 | 10 | var startTime time.Time 11 | 12 | func init() { 13 | startTime = time.Now().UTC() 14 | } 15 | 16 | // system captures system-level diagnostics. 17 | type system struct{} 18 | 19 | func (s *system) Diagnostics() (*diagnostics.Diagnostics, error) { 20 | d := map[string]interface{}{ 21 | "PID": os.Getpid(), 22 | "currentTime": time.Now().UTC(), 23 | "started": startTime, 24 | "uptime": time.Since(startTime).String(), 25 | } 26 | 27 | return diagnostics.RowFromMap(d), nil 28 | } 29 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/pkg/README.md: -------------------------------------------------------------------------------- 1 | pkg/ is a collection of utility packages used by the InfluxDB project without being specific to its internals. 2 | 3 | Utility packages are kept separate from the InfluxDB core codebase to keep it as small and concise as possible. If some utilities grow larger and their APIs stabilize, they may be moved to their own repository under the InfluxDB organization, to facilitate re-use by other projects. However that is not the priority. 4 | 5 | Because utility packages are small and neatly separated from the rest of the codebase, they are a good place to start for aspiring maintainers and contributors. Get in touch if you want to help maintain them! 6 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/pkg/bloom/bloom_test.go: -------------------------------------------------------------------------------- 1 | package bloom_test 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/influxdata/influxdb/pkg/bloom" 7 | ) 8 | 9 | // Ensure filter can insert values and verify they exist. 10 | func TestFilter_InsertContains(t *testing.T) { 11 | f := bloom.NewFilter(1000, 4) 12 | 13 | // Insert value and validate. 14 | f.Insert([]byte("Bess")) 15 | if !f.Contains([]byte("Bess")) { 16 | t.Fatal("expected true") 17 | } 18 | 19 | // Insert another value and test. 20 | f.Insert([]byte("Emma")) 21 | if !f.Contains([]byte("Emma")) { 22 | t.Fatal("expected true") 23 | } 24 | 25 | // Validate that a non-existent value doesn't exist. 26 | if f.Contains([]byte("Jane")) { 27 | t.Fatal("expected false") 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/pkg/escape/strings.go: -------------------------------------------------------------------------------- 1 | package escape 2 | 3 | import "strings" 4 | 5 | var ( 6 | escaper = strings.NewReplacer(`,`, `\,`, `"`, `\"`, ` `, `\ `, `=`, `\=`) 7 | unescaper = strings.NewReplacer(`\,`, `,`, `\"`, `"`, `\ `, ` `, `\=`, `=`) 8 | ) 9 | 10 | // UnescapeString returns unescaped version of in. 11 | func UnescapeString(in string) string { 12 | if strings.IndexByte(in, '\\') == -1 { 13 | return in 14 | } 15 | return unescaper.Replace(in) 16 | } 17 | 18 | // String returns the escaped version of in. 19 | func String(in string) string { 20 | return escaper.Replace(in) 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/pkg/estimator/sketch.go: -------------------------------------------------------------------------------- 1 | package estimator 2 | 3 | import "encoding" 4 | 5 | // Sketch is the interface representing a sketch for estimating cardinality. 6 | type Sketch interface { 7 | // Add adds a single value to the sketch. 8 | Add(v []byte) 9 | 10 | // Count returns a cardinality estimate for the sketch. 11 | Count() uint64 12 | 13 | // Merge merges another sketch into this one. 14 | Merge(s Sketch) error 15 | 16 | encoding.BinaryMarshaler 17 | encoding.BinaryUnmarshaler 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/pkg/limiter/fixed.go: -------------------------------------------------------------------------------- 1 | // Package limiter provides concurrency limiters. 2 | package limiter 3 | 4 | // Fixed is a simple channel-based concurrency limiter. It uses a fixed 5 | // size channel to limit callers from proceeding until there is a value available 6 | // in the channel. If all are in-use, the caller blocks until one is freed. 7 | type Fixed chan struct{} 8 | 9 | func NewFixed(limit int) Fixed { 10 | return make(Fixed, limit) 11 | } 12 | 13 | func (t Fixed) Take() { 14 | t <- struct{}{} 15 | } 16 | 17 | func (t Fixed) Release() { 18 | <-t 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/pkg/mmap/mmap_test.go: -------------------------------------------------------------------------------- 1 | package mmap_test 2 | 3 | import ( 4 | "bytes" 5 | "io/ioutil" 6 | "testing" 7 | 8 | "github.com/influxdata/influxdb/pkg/mmap" 9 | ) 10 | 11 | func TestMap(t *testing.T) { 12 | data, err := mmap.Map("mmap_test.go") 13 | if err != nil { 14 | t.Fatalf("Open: %v", err) 15 | } 16 | 17 | if exp, err := ioutil.ReadFile("mmap_test.go"); err != nil { 18 | t.Fatalf("ioutil.ReadFile: %v", err) 19 | } else if !bytes.Equal(data, exp) { 20 | t.Fatalf("got %q\nwant %q", string(data), string(exp)) 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/pkg/mmap/mmap_unix.go: -------------------------------------------------------------------------------- 1 | // +build darwin dragonfly freebsd linux nacl netbsd openbsd solaris 2 | 3 | // Copyright 2015 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | // Package mmap provides a way to memory-map a file. 8 | package mmap 9 | 10 | import ( 11 | "os" 12 | "syscall" 13 | ) 14 | 15 | // Map memory-maps a file. 16 | func Map(path string) ([]byte, error) { 17 | f, err := os.Open(path) 18 | if err != nil { 19 | return nil, err 20 | } 21 | defer f.Close() 22 | 23 | fi, err := f.Stat() 24 | if err != nil { 25 | return nil, err 26 | } else if fi.Size() == 0 { 27 | return nil, nil 28 | } 29 | 30 | data, err := syscall.Mmap(int(f.Fd()), 0, int(fi.Size()), syscall.PROT_READ, syscall.MAP_SHARED) 31 | if err != nil { 32 | return nil, err 33 | } 34 | return data, nil 35 | } 36 | 37 | // Unmap closes the memory-map. 38 | func Unmap(data []byte) error { 39 | if data == nil { 40 | return nil 41 | } 42 | return syscall.Munmap(data) 43 | } 44 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/pkg/pool/bytes_test.go: -------------------------------------------------------------------------------- 1 | package pool_test 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/influxdata/influxdb/pkg/pool" 7 | ) 8 | 9 | func TestLimitedBytePool_Put_MaxSize(t *testing.T) { 10 | bp := pool.NewLimitedBytes(1, 10) 11 | bp.Put(make([]byte, 1024)) // should be dropped 12 | 13 | if got, exp := cap(bp.Get(10)), 10; got != exp { 14 | t.Fatalf("max cap size exceeded: got %v, exp %v", got, exp) 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/releng/_go_versions.sh: -------------------------------------------------------------------------------- 1 | # These are the current and "next" Go versions used to build influxdb. 2 | # This file is meant to be sourced from other scripts. 3 | 4 | export GO_CURRENT_VERSION=1.8.3 5 | export GO_NEXT_VERSION=1.9 6 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/releng/raw-binaries/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG GO_VERSION 2 | FROM golang:${GO_VERSION} 3 | 4 | RUN apt-get update && apt-get install -y --no-install-recommends \ 5 | jq \ 6 | && rm -rf /var/lib/apt/lists/* 7 | 8 | COPY fs/ / 9 | 10 | ENTRYPOINT ["influxdb_raw_binaries.bash"] 11 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/releng/source-tarball/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG GO_VERSION 2 | FROM golang:${GO_VERSION}-alpine 3 | 4 | RUN apk add --no-cache \ 5 | bash \ 6 | git \ 7 | openssh-client \ 8 | tar 9 | 10 | # Build the gdm binary and then clean out /go. 11 | RUN go get github.com/sparrc/gdm && \ 12 | mv /go/bin/gdm /usr/local/bin/gdm && \ 13 | rm -rf /go/* 14 | 15 | COPY fs/ / 16 | 17 | ENTRYPOINT ["influxdb_tarball.bash"] 18 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/releng/unit-tests/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG GO_VERSION 2 | FROM golang:${GO_VERSION}-alpine 3 | 4 | RUN apk add --no-cache \ 5 | bash \ 6 | jq \ 7 | git 8 | 9 | RUN go get -u github.com/jstemmer/go-junit-report && \ 10 | mv /go/bin/go-junit-report /usr/bin/go-junit-report && \ 11 | rm -rf /go/* 12 | 13 | COPY fs/ / 14 | 15 | ENTRYPOINT ["influxdb_prebuild_tests.bash"] 16 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/releng/unit-tests/fs/usr/local/bin/influxdb_prebuild_tests.bash: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Extract tarball into GOPATH. 4 | tar xz -C "$GOPATH" -f /influxdb-src.tar.gz 5 | 6 | cd "$GOPATH/src/github.com/influxdata/influxdb" 7 | go test -v ./... 2>&1 | tee /out/tests.log | go-junit-report > /out/influxdb.junit.xml 8 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/scripts/influxdb.service: -------------------------------------------------------------------------------- 1 | # If you modify this, please also make sure to edit init.sh 2 | 3 | [Unit] 4 | Description=InfluxDB is an open-source, distributed, time series database 5 | Documentation=https://docs.influxdata.com/influxdb/ 6 | After=network-online.target 7 | 8 | [Service] 9 | User=influxdb 10 | Group=influxdb 11 | LimitNOFILE=65536 12 | EnvironmentFile=-/etc/default/influxdb 13 | ExecStart=/usr/bin/influxd -config /etc/influxdb/influxdb.conf ${INFLUXD_OPTS} 14 | KillMode=control-group 15 | Restart=on-failure 16 | 17 | [Install] 18 | WantedBy=multi-user.target 19 | Alias=influxd.service 20 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/scripts/logrotate: -------------------------------------------------------------------------------- 1 | /var/log/influxdb/influxd.log { 2 | daily 3 | rotate 7 4 | missingok 5 | dateext 6 | copytruncate 7 | compress 8 | } 9 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/scripts/pre-install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [[ -d /etc/opt/influxdb ]]; then 4 | # Legacy configuration found 5 | if [[ ! -d /etc/influxdb ]]; then 6 | # New configuration does not exist, move legacy configuration to new location 7 | echo -e "Please note, InfluxDB's configuration is now located at '/etc/influxdb' (previously '/etc/opt/influxdb')." 8 | mv -vn /etc/opt/influxdb /etc/influxdb 9 | 10 | if [[ -f /etc/influxdb/influxdb.conf ]]; then 11 | backup_name="influxdb.conf.$(date +%s).backup" 12 | echo "A backup of your current configuration can be found at: /etc/influxdb/$backup_name" 13 | cp -a /etc/influxdb/influxdb.conf /etc/influxdb/$backup_name 14 | fi 15 | fi 16 | fi 17 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/services/collectd/config_test.go: -------------------------------------------------------------------------------- 1 | package collectd_test 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/BurntSushi/toml" 7 | "github.com/influxdata/influxdb/services/collectd" 8 | ) 9 | 10 | func TestConfig_Parse(t *testing.T) { 11 | // Parse configuration. 12 | var c collectd.Config 13 | if _, err := toml.Decode(` 14 | enabled = true 15 | bind-address = ":9000" 16 | database = "xxx" 17 | typesdb = "yyy" 18 | `, &c); err != nil { 19 | t.Fatal(err) 20 | } 21 | 22 | // Validate configuration. 23 | if c.Enabled != true { 24 | t.Fatalf("unexpected enabled: %v", c.Enabled) 25 | } else if c.BindAddress != ":9000" { 26 | t.Fatalf("unexpected bind address: %s", c.BindAddress) 27 | } else if c.Database != "xxx" { 28 | t.Fatalf("unexpected database: %s", c.Database) 29 | } else if c.TypesDB != "yyy" { 30 | t.Fatalf("unexpected types db: %s", c.TypesDB) 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/services/collectd/test_client/README.md: -------------------------------------------------------------------------------- 1 | collectD Client 2 | ============ 3 | This directory contains code for generating collectd load. 4 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/services/graphite/errors.go: -------------------------------------------------------------------------------- 1 | package graphite 2 | 3 | import "fmt" 4 | 5 | // An UnsupportedValueError is returned when a parsed value is not 6 | // supported. 7 | type UnsupportedValueError struct { 8 | Field string 9 | Value float64 10 | } 11 | 12 | func (err *UnsupportedValueError) Error() string { 13 | return fmt.Sprintf(`field "%s" value: "%v" is unsupported`, err.Field, err.Value) 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/services/meta/config_test.go: -------------------------------------------------------------------------------- 1 | package meta_test 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/BurntSushi/toml" 7 | "github.com/influxdata/influxdb/services/meta" 8 | ) 9 | 10 | func TestConfig_Parse(t *testing.T) { 11 | // Parse configuration. 12 | var c meta.Config 13 | if _, err := toml.Decode(` 14 | dir = "/tmp/foo" 15 | logging-enabled = false 16 | `, &c); err != nil { 17 | t.Fatal(err) 18 | } 19 | 20 | // Validate configuration. 21 | if c.Dir != "/tmp/foo" { 22 | t.Fatalf("unexpected dir: %s", c.Dir) 23 | } else if c.LoggingEnabled { 24 | t.Fatalf("unexpected logging enabled: %v", c.LoggingEnabled) 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/services/meta/file_unix.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package meta 4 | 5 | import "os" 6 | 7 | // renameFile will rename the source to target using os function. 8 | func renameFile(oldpath, newpath string) error { 9 | return os.Rename(oldpath, newpath) 10 | } 11 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/services/meta/file_windows.go: -------------------------------------------------------------------------------- 1 | package meta 2 | 3 | import "os" 4 | 5 | // renameFile will rename the source to target using os function. If target exists it will be removed before renaming. 6 | func renameFile(oldpath, newpath string) error { 7 | if _, err := os.Stat(newpath); err == nil { 8 | if err = os.Remove(newpath); nil != err { 9 | return err 10 | } 11 | } 12 | 13 | return os.Rename(oldpath, newpath) 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/services/meta/meta_test.go: -------------------------------------------------------------------------------- 1 | package meta 2 | 3 | import "golang.org/x/crypto/bcrypt" 4 | 5 | func init() { 6 | bcryptCost = bcrypt.MinCost 7 | } 8 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/services/meta/write_authorizer.go: -------------------------------------------------------------------------------- 1 | package meta 2 | 3 | import ( 4 | "fmt" 5 | 6 | "github.com/influxdata/influxdb/influxql" 7 | ) 8 | 9 | // WriteAuthorizer determines whether a user is authorized to write to a given database. 10 | type WriteAuthorizer struct { 11 | Client *Client 12 | } 13 | 14 | // NewWriteAuthorizer returns a new instance of WriteAuthorizer. 15 | func NewWriteAuthorizer(c *Client) *WriteAuthorizer { 16 | return &WriteAuthorizer{Client: c} 17 | } 18 | 19 | // AuthorizeWrite returns nil if the user has permission to write to the database. 20 | func (a WriteAuthorizer) AuthorizeWrite(username, database string) error { 21 | u, err := a.Client.User(username) 22 | if err != nil || u == nil || !u.AuthorizeDatabase(influxql.WritePrivilege, database) { 23 | return &ErrAuthorize{ 24 | Database: database, 25 | Message: fmt.Sprintf("%s not authorized to write to %s", username, database), 26 | } 27 | } 28 | return nil 29 | } 30 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/services/snapshotter/service_test.go: -------------------------------------------------------------------------------- 1 | package snapshotter_test 2 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/services/subscriber/udp.go: -------------------------------------------------------------------------------- 1 | package subscriber 2 | 3 | import ( 4 | "net" 5 | 6 | "github.com/influxdata/influxdb/coordinator" 7 | ) 8 | 9 | // UDP supports writing points over UDP using the line protocol. 10 | type UDP struct { 11 | addr string 12 | } 13 | 14 | // NewUDP returns a new UDP listener with default options. 15 | func NewUDP(addr string) *UDP { 16 | return &UDP{addr: addr} 17 | } 18 | 19 | // WritePoints writes points over UDP transport. 20 | func (u *UDP) WritePoints(p *coordinator.WritePointsRequest) (err error) { 21 | var addr *net.UDPAddr 22 | var con *net.UDPConn 23 | addr, err = net.ResolveUDPAddr("udp", u.addr) 24 | if err != nil { 25 | return 26 | } 27 | 28 | con, err = net.DialUDP("udp", nil, addr) 29 | if err != nil { 30 | return 31 | } 32 | defer con.Close() 33 | 34 | for _, p := range p.Points { 35 | _, err = con.Write([]byte(p.String())) 36 | if err != nil { 37 | return 38 | } 39 | 40 | } 41 | return 42 | } 43 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/stress/v2/influx_stress_v2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Oxalide/vsphere-influxdb-go/dac91ccd2de8ec8cdcdd6f3edd1242761ae99da4/vendor/github.com/influxdata/influxdb/stress/v2/influx_stress_v2.png -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/stress/v2/iql/default.iql: -------------------------------------------------------------------------------- 1 | CREATE DATABASE stress 2 | 3 | GO INSERT cpu 4 | cpu, 5 | host=server-[int inc(0) 100000],location=us-west 6 | value=[int rand(100) 0] 7 | 10000000 10s 8 | 9 | GO QUERY cpu 10 | SELECT count(value) FROM cpu WHERE %t 11 | DO 250 12 | 13 | WAIT 14 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/stress/v2/iql/file.iql: -------------------------------------------------------------------------------- 1 | CREATE DATABASE thing 2 | 3 | CREATE DATABASE thing2 4 | 5 | SET Database [thing] 6 | 7 | SET Precision [s] 8 | 9 | GO INSERT mockCpu 10 | cpu, 11 | host=server-[float inc(0) 10000],loc=[us-west|us-east|eu-north] 12 | value=[int inc(100) 0] 13 | 100000 10s 14 | 15 | GO QUERY mockCpu 16 | SELECT mean(value) FROM cpu WHERE host='server-1' 17 | DO 10 18 | 19 | WAIT 20 | 21 | SET DATABASE [thing2] 22 | 23 | GO INSERT devices 24 | devices, 25 | city=[str rand(8) 100],country=[str rand(8) 25],device_id=[str rand(10) 100] 26 | lat=[float rand(90) 0],lng=[float rand(120) 0],temp=[float rand(40) 0] 27 | 100000 10s 28 | 29 | GO INSERT devices2 30 | devices2, 31 | city=[str rand(8) 100],country=[str rand(8) 25],device_id=[str rand(10) 100] 32 | lat=[float rand(90) 0],lng=[float rand(120) 0],temp=[float rand(40) 0] 33 | 100000 10s 34 | 35 | GO QUERY fooName 36 | SELECT count(temp) FROM devices WHERE temp > 30 37 | DO 10 38 | 39 | WAIT 40 | 41 | DROP DATABASE thing 42 | 43 | DROP DATABASE thing2 44 | 45 | WAIT 46 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/stress/v2/statement/exec.go: -------------------------------------------------------------------------------- 1 | package statement 2 | 3 | import ( 4 | "time" 5 | 6 | "github.com/influxdata/influxdb/stress/v2/stress_client" 7 | ) 8 | 9 | // ExecStatement run outside scripts. This functionality is not built out 10 | // TODO: Wire up! 11 | type ExecStatement struct { 12 | StatementID string 13 | Script string 14 | 15 | runtime time.Duration 16 | } 17 | 18 | // SetID statisfies the Statement Interface 19 | func (i *ExecStatement) SetID(s string) { 20 | i.StatementID = s 21 | } 22 | 23 | // Run statisfies the Statement Interface 24 | func (i *ExecStatement) Run(s *stressClient.StressTest) { 25 | runtime := time.Now() 26 | i.runtime = time.Since(runtime) 27 | } 28 | 29 | // Report statisfies the Statement Interface 30 | func (i *ExecStatement) Report(s *stressClient.StressTest) string { 31 | return "" 32 | } 33 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/stress/v2/statement/exec_test.go: -------------------------------------------------------------------------------- 1 | package statement 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/influxdata/influxdb/stress/v2/stress_client" 7 | ) 8 | 9 | func TestExecSetID(t *testing.T) { 10 | e := newTestExec() 11 | newID := "oaijnifo" 12 | e.SetID(newID) 13 | if e.StatementID != newID { 14 | t.Errorf("Expected: %v\nGot: %v\n", newID, e.StatementID) 15 | } 16 | } 17 | 18 | func TestExecRun(t *testing.T) { 19 | e := newTestExec() 20 | s, _, _ := stressClient.NewTestStressTest() 21 | e.Run(s) 22 | if e == nil { 23 | t.Fail() 24 | } 25 | } 26 | 27 | func TestExecReport(t *testing.T) { 28 | e := newTestExec() 29 | s, _, _ := stressClient.NewTestStressTest() 30 | rep := e.Report(s) 31 | if rep != "" { 32 | t.Fail() 33 | } 34 | } 35 | 36 | func newTestExec() *ExecStatement { 37 | return &ExecStatement{ 38 | StatementID: "fooID", 39 | Script: "fooscript.txt", 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/stress/v2/statement/go.go: -------------------------------------------------------------------------------- 1 | package statement 2 | 3 | import ( 4 | "fmt" 5 | "time" 6 | 7 | "github.com/influxdata/influxdb/stress/v2/stress_client" 8 | ) 9 | 10 | // GoStatement is a Statement Implementation to allow other statements to be run concurrently 11 | type GoStatement struct { 12 | Statement 13 | 14 | StatementID string 15 | } 16 | 17 | // SetID statisfies the Statement Interface 18 | func (i *GoStatement) SetID(s string) { 19 | i.StatementID = s 20 | } 21 | 22 | // Run statisfies the Statement Interface 23 | func (i *GoStatement) Run(s *stressClient.StressTest) { 24 | // TODO: remove 25 | switch i.Statement.(type) { 26 | case *QueryStatement: 27 | time.Sleep(1 * time.Second) 28 | } 29 | 30 | s.Add(1) 31 | go func() { 32 | i.Statement.Run(s) 33 | s.Done() 34 | }() 35 | } 36 | 37 | // Report statisfies the Statement Interface 38 | func (i *GoStatement) Report(s *stressClient.StressTest) string { 39 | return fmt.Sprintf("Go %v", i.Statement.Report(s)) 40 | } 41 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/stress/v2/statement/go_test.go: -------------------------------------------------------------------------------- 1 | package statement 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/influxdata/influxdb/stress/v2/stress_client" 7 | ) 8 | 9 | func TestGoSetID(t *testing.T) { 10 | e := newTestGo() 11 | newID := "oaijnifo" 12 | e.SetID(newID) 13 | if e.StatementID != newID { 14 | t.Errorf("Expected: %v\nGot: %v\n", newID, e.StatementID) 15 | } 16 | } 17 | 18 | func TestGoRun(t *testing.T) { 19 | e := newTestGo() 20 | s, _, _ := stressClient.NewTestStressTest() 21 | e.Run(s) 22 | if e == nil { 23 | t.Fail() 24 | } 25 | } 26 | 27 | func TestGoReport(t *testing.T) { 28 | e := newTestGo() 29 | s, _, _ := stressClient.NewTestStressTest() 30 | report := e.Report(s) 31 | if report != "Go " { 32 | t.Errorf("Expected: %v\nGot: %v\n", "Go ", report) 33 | } 34 | } 35 | 36 | func newTestGo() *GoStatement { 37 | return &GoStatement{ 38 | Statement: newTestExec(), 39 | StatementID: "fooID", 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/stress/v2/statement/response_time.go: -------------------------------------------------------------------------------- 1 | package statement 2 | 3 | import ( 4 | "time" 5 | ) 6 | 7 | // ResponseTime is a struct that contains `Value` 8 | // `Time` pairing. 9 | type ResponseTime struct { 10 | Value int 11 | Time time.Time 12 | } 13 | 14 | // NewResponseTime returns a new response time 15 | // with value `v` and time `time.Now()`. 16 | func NewResponseTime(v int) ResponseTime { 17 | r := ResponseTime{Value: v, Time: time.Now()} 18 | return r 19 | } 20 | 21 | // ResponseTimes is a slice of response times 22 | type ResponseTimes []ResponseTime 23 | 24 | // Implements the `Len` method for the 25 | // sort.Interface type 26 | func (rs ResponseTimes) Len() int { 27 | return len(rs) 28 | } 29 | 30 | // Implements the `Less` method for the 31 | // sort.Interface type 32 | func (rs ResponseTimes) Less(i, j int) bool { 33 | return rs[i].Value < rs[j].Value 34 | } 35 | 36 | // Implements the `Swap` method for the 37 | // sort.Interface type 38 | func (rs ResponseTimes) Swap(i, j int) { 39 | rs[i], rs[j] = rs[j], rs[i] 40 | } 41 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/stress/v2/statement/response_time_test.go: -------------------------------------------------------------------------------- 1 | package statement 2 | 3 | import ( 4 | "testing" 5 | ) 6 | 7 | func TestNewResponseTime(t *testing.T) { 8 | value := 100000 9 | rs := NewResponseTime(value) 10 | if rs.Value != value { 11 | t.Errorf("expected: %v\ngot: %v\n", value, rs.Value) 12 | } 13 | } 14 | 15 | func newResponseTimes() ResponseTimes { 16 | return []ResponseTime{ 17 | NewResponseTime(100), 18 | NewResponseTime(10), 19 | } 20 | } 21 | 22 | func TestResponseTimeLen(t *testing.T) { 23 | rs := newResponseTimes() 24 | if rs.Len() != 2 { 25 | t.Fail() 26 | } 27 | } 28 | 29 | func TestResponseTimeLess(t *testing.T) { 30 | rs := newResponseTimes() 31 | less := rs.Less(1, 0) 32 | if !less { 33 | t.Fail() 34 | } 35 | } 36 | 37 | func TestResponseTimeSwap(t *testing.T) { 38 | rs := newResponseTimes() 39 | rs0 := rs[0] 40 | rs1 := rs[1] 41 | rs.Swap(0, 1) 42 | if rs0 != rs[1] || rs1 != rs[0] { 43 | t.Fail() 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/stress/v2/statement/statement.go: -------------------------------------------------------------------------------- 1 | package statement 2 | 3 | import ( 4 | "log" 5 | "strconv" 6 | 7 | "github.com/influxdata/influxdb/stress/v2/stress_client" 8 | ) 9 | 10 | // Statement is the common interface to shape the testing environment and prepare database requests 11 | // The parser turns the 'statements' in the config file into Statements 12 | type Statement interface { 13 | Run(s *stressClient.StressTest) 14 | Report(s *stressClient.StressTest) string 15 | SetID(s string) 16 | } 17 | 18 | func parseInt(s string) int { 19 | i, err := strconv.ParseInt(s, 10, 64) 20 | if err != nil { 21 | log.Fatalf("Error parsing integer:\n String: %v\n Error: %v\n", s, err) 22 | } 23 | return int(i) 24 | } 25 | 26 | func parseFloat(s string) int { 27 | i, err := strconv.ParseFloat(s, 64) 28 | if err != nil { 29 | log.Fatalf("Error parsing integer:\n String: %v\n Error: %v\n", s, err) 30 | } 31 | return int(i) 32 | } 33 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/stress/v2/statement/timestamp_test.go: -------------------------------------------------------------------------------- 1 | package statement 2 | 3 | import ( 4 | "testing" 5 | "time" 6 | ) 7 | 8 | func TestTimestampTime(t *testing.T) { 9 | tstp := newTestTimestamp() 10 | function := tstp.Time("2016-01-01", 100, "s") 11 | expected := int64(1451606400) 12 | got := function() 13 | if expected != got { 14 | t.Errorf("expected: %v\ngot: %v\n", expected, got) 15 | } 16 | function = tstp.Time("now", 100, "ns") 17 | expected = time.Now().UnixNano() 18 | got = function() 19 | if expected < got { 20 | t.Errorf("expected: %v\ngot: %v\n", expected, got) 21 | } 22 | } 23 | 24 | func newTestTimestamp() *Timestamp { 25 | duration, _ := time.ParseDuration("10s") 26 | return &Timestamp{ 27 | Count: 5001, 28 | Duration: duration, 29 | Jitter: false, 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/stress/v2/statement/wait.go: -------------------------------------------------------------------------------- 1 | package statement 2 | 3 | import ( 4 | "fmt" 5 | "time" 6 | 7 | "github.com/influxdata/influxdb/stress/v2/stress_client" 8 | ) 9 | 10 | // WaitStatement is a Statement Implementation to prevent the test from returning to early when running GoStatements 11 | type WaitStatement struct { 12 | StatementID string 13 | 14 | runtime time.Duration 15 | } 16 | 17 | // SetID statisfies the Statement Interface 18 | func (w *WaitStatement) SetID(s string) { 19 | w.StatementID = s 20 | } 21 | 22 | // Run statisfies the Statement Interface 23 | func (w *WaitStatement) Run(s *stressClient.StressTest) { 24 | runtime := time.Now() 25 | s.Wait() 26 | w.runtime = time.Since(runtime) 27 | } 28 | 29 | // Report statisfies the Statement Interface 30 | func (w *WaitStatement) Report(s *stressClient.StressTest) string { 31 | return fmt.Sprintf("WAIT -> %v", w.runtime) 32 | } 33 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/stress/v2/statement/wait_test.go: -------------------------------------------------------------------------------- 1 | package statement 2 | 3 | import ( 4 | "strings" 5 | "testing" 6 | 7 | "github.com/influxdata/influxdb/stress/v2/stress_client" 8 | ) 9 | 10 | func TestWaitSetID(t *testing.T) { 11 | e := newTestWait() 12 | newID := "oaijnifo" 13 | e.SetID(newID) 14 | if e.StatementID != newID { 15 | t.Errorf("Expected: %v\ngott: %v\n", newID, e.StatementID) 16 | } 17 | } 18 | 19 | func TestWaitRun(t *testing.T) { 20 | e := newTestWait() 21 | s, _, _ := stressClient.NewTestStressTest() 22 | e.Run(s) 23 | if e == nil { 24 | t.Fail() 25 | } 26 | } 27 | 28 | func TestWaitReport(t *testing.T) { 29 | e := newTestWait() 30 | s, _, _ := stressClient.NewTestStressTest() 31 | rpt := e.Report(s) 32 | if !strings.Contains(rpt, "WAIT") { 33 | t.Fail() 34 | } 35 | } 36 | 37 | func newTestWait() *WaitStatement { 38 | return &WaitStatement{ 39 | StatementID: "fooID", 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/stress/v2/stress_client/directive.go: -------------------------------------------------------------------------------- 1 | package stressClient 2 | 3 | // Directive is a struct to enable communication between SetStatements and the stressClient backend 4 | // Directives change state for the stress test 5 | type Directive struct { 6 | Property string 7 | Value string 8 | Tracer *Tracer 9 | } 10 | 11 | // NewDirective creates a new instance of a Directive with the appropriate state variable to change 12 | func NewDirective(property string, value string, tracer *Tracer) Directive { 13 | d := Directive{ 14 | Property: property, 15 | Value: value, 16 | Tracer: tracer, 17 | } 18 | return d 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/stress/v2/stress_client/directive_test.go: -------------------------------------------------------------------------------- 1 | package stressClient 2 | 3 | import ( 4 | "testing" 5 | ) 6 | 7 | func TestNewDirective(t *testing.T) { 8 | tr := NewTracer(map[string]string{}) 9 | prop := "foo_prop" 10 | val := "foo_value" 11 | dir := NewDirective(prop, val, tr) 12 | got := dir.Property 13 | if prop != got { 14 | t.Errorf("expected: %v\ngot: %v\n", prop, got) 15 | } 16 | got = dir.Value 17 | if val != got { 18 | t.Errorf("expected: %v\ngot: %v\n", val, got) 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/stress/v2/stress_client/package.go: -------------------------------------------------------------------------------- 1 | package stressClient 2 | 3 | // Package is a struct to enable communication between InsertStatements, QueryStatements and InfluxQLStatements and the stressClient backend 4 | // Packages carry either writes or queries in the []byte that makes up the Body 5 | type Package struct { 6 | T Type 7 | Body []byte 8 | StatementID string 9 | Tracer *Tracer 10 | } 11 | 12 | // NewPackage creates a new package with the appropriate payload 13 | func NewPackage(t Type, body []byte, statementID string, tracer *Tracer) Package { 14 | p := Package{ 15 | T: t, 16 | Body: body, 17 | StatementID: statementID, 18 | Tracer: tracer, 19 | } 20 | 21 | return p 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/stress/v2/stress_client/package_test.go: -------------------------------------------------------------------------------- 1 | package stressClient 2 | 3 | import ( 4 | "testing" 5 | ) 6 | 7 | func TestNewPackage(t *testing.T) { 8 | qry := []byte("SELECT * FROM foo") 9 | statementID := "foo_id" 10 | tr := NewTracer(map[string]string{}) 11 | pkg := NewPackage(Query, qry, statementID, tr) 12 | got := string(pkg.Body) 13 | if string(qry) != got { 14 | t.Errorf("expected: %v\ngot: %v\n", qry, got) 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/stress/v2/stress_client/response_test.go: -------------------------------------------------------------------------------- 1 | package stressClient 2 | 3 | import ( 4 | "testing" 5 | ) 6 | 7 | func TestNewResponse(t *testing.T) { 8 | pt := NewBlankTestPoint() 9 | tr := NewTracer(map[string]string{}) 10 | r := NewResponse(pt, tr) 11 | expected := "another_tag_value" 12 | test, err := r.AddTags(map[string]string{"another_tag": "another_tag_value"}) 13 | if err != nil { 14 | t.Fatal(err) 15 | } 16 | got := test.Tags()["another_tag"] 17 | if expected != got { 18 | t.Errorf("expected: %v\ngot: %v\n", expected, got) 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/stress/v2/stress_client/stressTest_test.go: -------------------------------------------------------------------------------- 1 | package stressClient 2 | 3 | import ( 4 | "testing" 5 | "time" 6 | 7 | influx "github.com/influxdata/influxdb/client/v2" 8 | ) 9 | 10 | func NewBlankTestPoint() *influx.Point { 11 | meas := "measurement" 12 | tags := map[string]string{"fooTag": "fooTagValue"} 13 | fields := map[string]interface{}{"value": 5920} 14 | utc, _ := time.LoadLocation("UTC") 15 | timestamp := time.Date(2016, time.Month(4), 20, 0, 0, 0, 0, utc) 16 | pt, _ := influx.NewPoint(meas, tags, fields, timestamp) 17 | return pt 18 | } 19 | 20 | func TestStressTestBatcher(t *testing.T) { 21 | sf, _, _ := NewTestStressTest() 22 | bpconf := influx.BatchPointsConfig{ 23 | Database: sf.TestDB, 24 | Precision: "ns", 25 | } 26 | bp, _ := influx.NewBatchPoints(bpconf) 27 | pt := NewBlankTestPoint() 28 | bp = sf.batcher(pt, bp) 29 | if len(bp.Points()) != 1 { 30 | t.Fail() 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/stress/v2/stress_client/tracer.go: -------------------------------------------------------------------------------- 1 | package stressClient 2 | 3 | import ( 4 | "sync" 5 | ) 6 | 7 | // The Tracer carrys tags and a waitgroup from the statements through the package life cycle 8 | type Tracer struct { 9 | Tags map[string]string 10 | 11 | sync.WaitGroup 12 | } 13 | 14 | // NewTracer returns a Tracer with tags attached 15 | func NewTracer(tags map[string]string) *Tracer { 16 | return &Tracer{ 17 | Tags: tags, 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/stress/v2/stress_client/tracer_test.go: -------------------------------------------------------------------------------- 1 | package stressClient 2 | 3 | import ( 4 | "testing" 5 | ) 6 | 7 | func TestNewTracer(t *testing.T) { 8 | tagValue := "foo_tag_value" 9 | tracer := NewTracer(map[string]string{"foo_tag_key": tagValue}) 10 | got := tracer.Tags["foo_tag_key"] 11 | if got != tagValue { 12 | t.Errorf("expected: %v\ngot: %v", tagValue, got) 13 | } 14 | tracer.Add(1) 15 | tracer.Done() 16 | tracer.Wait() 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/stress/v2/stressql/parser_test.go: -------------------------------------------------------------------------------- 1 | package stressql 2 | 3 | import "testing" 4 | 5 | // Pulls the default configFile and makes sure it parses 6 | func TestParseStatements(t *testing.T) { 7 | stmts, err := ParseStatements("../iql/file.iql") 8 | if err != nil { 9 | t.Error(err) 10 | } 11 | expected := 15 12 | got := len(stmts) 13 | if expected != got { 14 | t.Errorf("expected: %v\ngot: %v\n", expected, got) 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/tsdb/cursor.go: -------------------------------------------------------------------------------- 1 | package tsdb 2 | 3 | import "github.com/influxdata/influxdb/influxql" 4 | 5 | // EOF represents a "not found" key returned by a Cursor. 6 | const EOF = influxql.ZeroTime 7 | 8 | // Cursor represents an iterator over a series. 9 | type Cursor interface { 10 | SeekTo(seek int64) (key int64, value interface{}) 11 | Next() (key int64, value interface{}) 12 | Ascending() bool 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/tsdb/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Package tsdb implements a durable time series database. 3 | 4 | */ 5 | package tsdb 6 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/tsdb/engine/engine.go: -------------------------------------------------------------------------------- 1 | // Package engine can be imported to initialize and register all available TSDB engines. 2 | // 3 | // Alternatively, you can import any individual subpackage underneath engine. 4 | package engine // import "github.com/influxdata/influxdb/tsdb/engine" 5 | 6 | import ( 7 | // Initialize and register tsm1 engine 8 | _ "github.com/influxdata/influxdb/tsdb/engine/tsm1" 9 | ) 10 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/tsdb/engine/tsm1/MANIFEST: -------------------------------------------------------------------------------- 1 | { 2 | "files": [ 3 | "00000001.tsl" 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/tsdb/engine/tsm1/compact.gen.go.tmpldata: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "Name":"Float", 4 | "name":"float" 5 | }, 6 | { 7 | "Name":"Integer", 8 | "name":"integer" 9 | }, 10 | { 11 | "Name":"String", 12 | "name":"string" 13 | }, 14 | { 15 | "Name":"Boolean", 16 | "name":"boolean" 17 | } 18 | ] 19 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/tsdb/engine/tsm1/encoding.gen.go.tmpldata: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "Name":"", 4 | "name":"", 5 | "Type":"" 6 | }, 7 | { 8 | "Name":"Float", 9 | "name":"float", 10 | "Type":"BlockFloat64" 11 | }, 12 | { 13 | "Name":"Integer", 14 | "name":"integer", 15 | "Type":"BlockInteger" 16 | }, 17 | { 18 | "Name":"String", 19 | "name":"string", 20 | "Type":"BlockString" 21 | }, 22 | { 23 | "Name":"Boolean", 24 | "name":"boolean", 25 | "Type":"BlockBoolean" 26 | } 27 | ] 28 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/tsdb/engine/tsm1/file_store.gen.go.tmpldata: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "Name":"Float", 4 | "name":"float" 5 | }, 6 | { 7 | "Name":"Integer", 8 | "name":"integer" 9 | }, 10 | { 11 | "Name":"String", 12 | "name":"string" 13 | }, 14 | { 15 | "Name":"Boolean", 16 | "name":"boolean" 17 | } 18 | ] 19 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/tsdb/engine/tsm1/file_unix.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package tsm1 4 | 5 | import "os" 6 | 7 | func syncDir(dirName string) error { 8 | // fsync the dir to flush the rename 9 | dir, err := os.OpenFile(dirName, os.O_RDONLY, os.ModeDir) 10 | if err != nil { 11 | return err 12 | } 13 | defer dir.Close() 14 | return dir.Sync() 15 | } 16 | 17 | // renameFile will rename the source to target using os function. 18 | func renameFile(oldpath, newpath string) error { 19 | return os.Rename(oldpath, newpath) 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/tsdb/engine/tsm1/file_windows.go: -------------------------------------------------------------------------------- 1 | package tsm1 2 | 3 | import "os" 4 | 5 | func syncDir(dirName string) error { 6 | return nil 7 | } 8 | 9 | // renameFile will rename the source to target using os function. If target exists it will be removed before renaming. 10 | func renameFile(oldpath, newpath string) error { 11 | if _, err := os.Stat(newpath); err == nil { 12 | if err = os.Remove(newpath); nil != err { 13 | return err 14 | } 15 | } 16 | 17 | return os.Rename(oldpath, newpath) 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/tsdb/engine/tsm1/iterator.gen.go.tmpldata: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "Name":"Float", 4 | "name":"float", 5 | "Type":"float64", 6 | "ValueType":"FloatValue", 7 | "Nil":"0" 8 | }, 9 | { 10 | "Name":"Integer", 11 | "name":"integer", 12 | "Type":"int64", 13 | "ValueType":"IntegerValue", 14 | "Nil":"0" 15 | }, 16 | { 17 | "Name":"String", 18 | "name":"string", 19 | "Type":"string", 20 | "ValueType":"StringValue", 21 | "Nil":"\"\"" 22 | }, 23 | { 24 | "Name":"Boolean", 25 | "name":"boolean", 26 | "Type":"bool", 27 | "ValueType":"BooleanValue", 28 | "Nil":"false" 29 | } 30 | ] 31 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/tsdb/engine/tsm1/mmap_solaris.go: -------------------------------------------------------------------------------- 1 | // +build solaris 2 | 3 | package tsm1 4 | 5 | import ( 6 | "os" 7 | "syscall" 8 | 9 | "golang.org/x/sys/unix" 10 | ) 11 | 12 | func mmap(f *os.File, offset int64, length int) ([]byte, error) { 13 | mmap, err := unix.Mmap(int(f.Fd()), 0, length, syscall.PROT_READ, syscall.MAP_SHARED) 14 | if err != nil { 15 | return nil, err 16 | } 17 | 18 | if err := unix.Madvise(mmap, syscall.MADV_RANDOM); err != nil { 19 | return nil, err 20 | } 21 | 22 | return mmap, nil 23 | } 24 | 25 | func munmap(b []byte) (err error) { 26 | return unix.Munmap(b) 27 | } 28 | 29 | // From: github.com/boltdb/bolt/bolt_unix.go 30 | func madvise(b []byte, advice int) (err error) { 31 | return unix.Madvise(b, advice) 32 | } 33 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/tsdb/engine/tsm1/mmap_unix.go: -------------------------------------------------------------------------------- 1 | // +build !windows,!plan9,!solaris 2 | 3 | package tsm1 4 | 5 | import ( 6 | "os" 7 | "syscall" 8 | ) 9 | 10 | func mmap(f *os.File, offset int64, length int) ([]byte, error) { 11 | mmap, err := syscall.Mmap(int(f.Fd()), 0, length, syscall.PROT_READ, syscall.MAP_SHARED) 12 | if err != nil { 13 | return nil, err 14 | } 15 | 16 | return mmap, nil 17 | } 18 | 19 | func munmap(b []byte) (err error) { 20 | return syscall.Munmap(b) 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/tsdb/engine/tsm1/pools.go: -------------------------------------------------------------------------------- 1 | package tsm1 2 | 3 | import "sync" 4 | 5 | var bufPool sync.Pool 6 | 7 | // getBuf returns a buffer with length size from the buffer pool. 8 | func getBuf(size int) *[]byte { 9 | x := bufPool.Get() 10 | if x == nil { 11 | b := make([]byte, size) 12 | return &b 13 | } 14 | buf := x.(*[]byte) 15 | if cap(*buf) < size { 16 | b := make([]byte, size) 17 | return &b 18 | } 19 | *buf = (*buf)[:size] 20 | return buf 21 | } 22 | 23 | // putBuf returns a buffer to the pool. 24 | func putBuf(buf *[]byte) { 25 | bufPool.Put(buf) 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/tsdb/index/index.go: -------------------------------------------------------------------------------- 1 | package index // import "github.com/influxdata/influxdb/tsdb/index" 2 | 3 | import ( 4 | _ "github.com/influxdata/influxdb/tsdb/index/inmem" 5 | _ "github.com/influxdata/influxdb/tsdb/index/tsi1" 6 | ) 7 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/tsdb/internal/meta.proto: -------------------------------------------------------------------------------- 1 | package meta; 2 | 3 | //======================================================================== 4 | // 5 | // Metadata 6 | // 7 | //======================================================================== 8 | 9 | message Series { 10 | required string Key = 1; 11 | repeated Tag Tags = 2; 12 | } 13 | 14 | message Tag { 15 | required string Key = 1; 16 | required string Value = 2; 17 | } 18 | 19 | message MeasurementFields { 20 | repeated Field Fields = 1; 21 | } 22 | 23 | message Field { 24 | required int32 ID = 1; 25 | required string Name = 2; 26 | required int32 Type = 3; 27 | } -------------------------------------------------------------------------------- /vendor/github.com/vmware/govmomi/.drone.sec: -------------------------------------------------------------------------------- 1 | eyJhbGciOiJSU0EtT0FFUCIsImVuYyI6IkExMjhHQ00ifQ.kK6pryC8R-O1R0Gj9ydLvQuIZlcYLGze23WdW7xbpiEEKdz6nweJrMm7ysy8lgu1tM47JVo19p2_b26bNKSQshCUOETvd7Hb2UMZOjnyUnqdyAAyoi6UkIquXfUUbHTNS0iMxwSxxW9KMp2GXNq8-o6T8xQZTDirBJFKKd8ZNUasTaoa5j8U9IfdR1aCavTBuOhvk8IVs-jSbY5TVJMJiE0IOPXois7aRJ6uAiANQBk9VKLegEcZD_qAewecXHDsHi-u0jbmg3o3PPaJaK_Qv5dsPlR2M-E2kE3AGUn0-zn5zYRngoAZ8WZr2O4GvLdltJKq9i2z7jOrdOzzRcDRow.96qvwl_E1Hj15u7Q.hWs-jQ8FsqQFD7pE9N-UEP1BWQ9rsJIcCaPvQRIp8Fukm_vvlw9YEaEq0ERLrsUWsJWpd1ca8_h8x7xD6f_d5YppwRqRHIeGIsdBOTMhNs0lG8ikkQXLat-UroCpy8EC17nuUtDE2E2Kdxrk4Cdd6Bk-dKk0Ta4w3Ud0YBKa.P8zrO7xizgv0i98eVWWzEg -------------------------------------------------------------------------------- /vendor/github.com/vmware/govmomi/.drone.yml: -------------------------------------------------------------------------------- 1 | clone: 2 | tags: true 3 | path: github.com/vmware/govmomi 4 | build: 5 | image: golang:1.7 6 | pull: true 7 | environment: 8 | - GOVC_TEST_URL=$$GOVC_TEST_URL 9 | - GOVC_INSECURE=1 10 | - VCA=1 11 | commands: 12 | - make all install 13 | - git clone https://github.com/sstephenson/bats.git /tmp/bats 14 | - /tmp/bats/install.sh /usr/local 15 | - apt-get -qq update && apt-get install -yqq uuid-runtime bsdmainutils jq 16 | - govc/test/images/update.sh 17 | - bats govc/test 18 | -------------------------------------------------------------------------------- /vendor/github.com/vmware/govmomi/.gitignore: -------------------------------------------------------------------------------- 1 | secrets.yml 2 | -------------------------------------------------------------------------------- /vendor/github.com/vmware/govmomi/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | 3 | language: go 4 | 5 | go: 6 | - 1.7 7 | 8 | before_install: 9 | - make vendor 10 | 11 | script: 12 | - make check test 13 | -------------------------------------------------------------------------------- /vendor/github.com/vmware/govmomi/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: test 2 | 3 | all: check test 4 | 5 | check: goimports govet 6 | 7 | goimports: 8 | @echo checking go imports... 9 | @go get golang.org/x/tools/cmd/goimports 10 | @! goimports -d . 2>&1 | egrep -v '^$$' 11 | 12 | govet: 13 | @echo checking go vet... 14 | @go tool vet -structtags=false -methods=false . 15 | 16 | test: 17 | go test -v $(TEST_OPTS) ./... 18 | 19 | install: 20 | go install github.com/vmware/govmomi/govc 21 | 22 | doc: install 23 | ./govc/usage.sh > ./govc/USAGE.md 24 | -------------------------------------------------------------------------------- /vendor/github.com/vmware/govmomi/gen/Gemfile: -------------------------------------------------------------------------------- 1 | source "https://rubygems.org" 2 | 3 | gem "nokogiri" 4 | -------------------------------------------------------------------------------- /vendor/github.com/vmware/govmomi/gen/Gemfile.lock: -------------------------------------------------------------------------------- 1 | GEM 2 | remote: https://rubygems.org/ 3 | specs: 4 | mini_portile (0.6.0) 5 | nokogiri (1.6.3.1) 6 | mini_portile (= 0.6.0) 7 | 8 | PLATFORMS 9 | ruby 10 | 11 | DEPENDENCIES 12 | nokogiri 13 | -------------------------------------------------------------------------------- /vendor/github.com/vmware/govmomi/govc/.gitignore: -------------------------------------------------------------------------------- 1 | /govc* 2 | -------------------------------------------------------------------------------- /vendor/github.com/vmware/govmomi/govc/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | git_version=$(git describe) 4 | if git_status=$(git status --porcelain 2>/dev/null) && [ -n "${git_status}" ]; then 5 | git_version="${git_version}-dirty" 6 | fi 7 | 8 | ldflags="-X github.com/vmware/govmomi/govc/version.gitVersion=${git_version}" 9 | 10 | BUILD_OS=${BUILD_OS:-darwin linux windows freebsd} 11 | BUILD_ARCH=${BUILD_ARCH:-386 amd64} 12 | 13 | for os in ${BUILD_OS}; do 14 | export GOOS="${os}" 15 | for arch in ${BUILD_ARCH}; do 16 | export GOARCH="${arch}" 17 | 18 | out="govc_${os}_${arch}" 19 | if [ "${os}" == "windows" ]; then 20 | out="${out}.exe" 21 | fi 22 | 23 | set -x 24 | go build \ 25 | -o="${out}" \ 26 | -pkgdir="./_pkg" \ 27 | -compiler='gc' \ 28 | -ldflags="${ldflags}" \ 29 | github.com/vmware/govmomi/govc & 30 | set +x 31 | done 32 | done 33 | 34 | wait 35 | -------------------------------------------------------------------------------- /vendor/github.com/vmware/govmomi/govc/cli/register.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 VMware, Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package cli 18 | 19 | var commands = map[string]Command{} 20 | 21 | var aliases = map[string]string{} 22 | 23 | func Register(name string, c Command) { 24 | commands[name] = c 25 | } 26 | 27 | func Alias(name string, alias string) { 28 | aliases[alias] = name 29 | } 30 | 31 | func Commands() map[string]Command { 32 | return commands 33 | } 34 | -------------------------------------------------------------------------------- /vendor/github.com/vmware/govmomi/govc/emacs/.gitignore: -------------------------------------------------------------------------------- 1 | .cask 2 | elpa 3 | *.elc 4 | -------------------------------------------------------------------------------- /vendor/github.com/vmware/govmomi/govc/emacs/Cask: -------------------------------------------------------------------------------- 1 | (source gnu) 2 | (source melpa) 3 | 4 | (package-file "govc.el") 5 | 6 | (development 7 | (depends-on "dash") 8 | (depends-on "json-mode") 9 | (depends-on "magit") 10 | (depends-on "s")) 11 | -------------------------------------------------------------------------------- /vendor/github.com/vmware/govmomi/govc/emacs/Makefile: -------------------------------------------------------------------------------- 1 | CASK = cask 2 | EMACS_BIN ?= emacs 3 | EMACS_FLAGS = 4 | EMACS_EXEC = $(CASK) exec $(EMACS_BIN) --no-site-file --no-site-lisp --batch $(EMACS_FLAGS) 5 | 6 | OBJECTS = govc.elc 7 | 8 | elpa: 9 | $(CASK) install 10 | $(CASK) update 11 | touch $@ 12 | 13 | .PHONY: build test docs clean 14 | 15 | build: elpa $(OBJECTS) 16 | 17 | test: build docs 18 | $(EMACS_EXEC) -l test/make.el -f make-test 19 | 20 | docs: build 21 | $(EMACS_EXEC) -l test/make.el -f make-docs 22 | clean: 23 | rm -f $(OBJECTS) elpa 24 | rm -rf .cask 25 | 26 | %.elc: %.el 27 | $(EMACS_EXEC) -f batch-byte-compile $< 28 | -------------------------------------------------------------------------------- /vendor/github.com/vmware/govmomi/govc/flags/empty.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2016 VMware, Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package flags 18 | 19 | import ( 20 | "context" 21 | "flag" 22 | ) 23 | 24 | type EmptyFlag struct{} 25 | 26 | func (flag *EmptyFlag) Register(ctx context.Context, f *flag.FlagSet) { 27 | } 28 | 29 | func (flag *EmptyFlag) Process(ctx context.Context) error { 30 | return nil 31 | } 32 | -------------------------------------------------------------------------------- /vendor/github.com/vmware/govmomi/govc/host/esxcli/fixtures/network_vm_list.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | foo 4 | VM Network 5 | dougm 6 | 2 7 | 98842 8 | 9 | 10 | bar 11 | VM Network 12 | 1 13 | 236235 14 | 15 | 16 | -------------------------------------------------------------------------------- /vendor/github.com/vmware/govmomi/govc/host/esxcli/fixtures/network_vm_port_list.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 192.168.247.149 5 | 00:0c:29:12:b2:cf 6 | 33554438 7 | VM Network 8 | vmnic0 9 | 33554434 10 | vSwitch0 11 | 12 | 13 | -------------------------------------------------------------------------------- /vendor/github.com/vmware/govmomi/govc/host/esxcli/fixtures/system_hostname_get.xml: -------------------------------------------------------------------------------- 1 | 2 | localdomain 3 | esxbox.localdomain 4 | esxbox 5 | 6 | -------------------------------------------------------------------------------- /vendor/github.com/vmware/govmomi/govc/test/.gitignore: -------------------------------------------------------------------------------- 1 | .vagrant 2 | govc_ca.* 3 | -------------------------------------------------------------------------------- /vendor/github.com/vmware/govmomi/govc/test/clean.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Cleanup any artifacts created by govc 4 | # 5 | 6 | . $(dirname $0)/test_helper.bash 7 | 8 | teardown 9 | 10 | datastore_rm() { 11 | name=$1 12 | govc datastore.rm $name 2> /dev/null 13 | } 14 | 15 | datastore_rm $GOVC_TEST_IMG 16 | datastore_rm $GOVC_TEST_ISO 17 | datastore_rm $GOVC_TEST_VMDK 18 | datastore_rm $(echo $GOVC_TEST_VMDK | sed 's/.vmdk/-flat.vmdk/') 19 | datastore_rm $(dirname $GOVC_TEST_VMDK) 20 | 21 | # Recursively destroy all resource pools created by the test suite 22 | govc ls host/*/Resources/govc-test-* | \ 23 | xargs -rt govc pool.destroy -r 24 | 25 | govc datastore.ls 26 | -------------------------------------------------------------------------------- /vendor/github.com/vmware/govmomi/govc/test/datastore_tail_test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -xe 2 | 3 | # This test is not run via bats as the bats pipeline hangs when we background a process 4 | 5 | . "$(dirname "$0")"/test_helper.bash 6 | 7 | name=$(new_id) 8 | n=16 9 | tmp=$(mktemp --tmpdir "${name}-XXXXX") 10 | 11 | echo -n | govc datastore.upload - "$name" 12 | govc datastore.tail -f "$name" > "$tmp" & 13 | pid=$! 14 | 15 | sleep 1 16 | yes | dd bs=${n}K count=1 2>/dev/null | govc datastore.upload - "$name" 17 | sleep 2 18 | 19 | # stops following when the file has gone away 20 | govc datastore.mv "$name" "${name}.old" 21 | wait $pid 22 | 23 | govc datastore.download "${name}.old" - | cmp "$tmp" - 24 | 25 | rm "$tmp" 26 | teardown 27 | -------------------------------------------------------------------------------- /vendor/github.com/vmware/govmomi/govc/test/esxbox/Vagrantfile: -------------------------------------------------------------------------------- 1 | # -*- mode: ruby -*- 2 | # vi: set ft=ruby : 3 | 4 | Vagrant.configure("2") do |config| 5 | config.ssh.insert_key = false 6 | config.ssh.default.username = "root" 7 | config.ssh.shell = "sh" 8 | config.vm.hostname = "esxbox" 9 | 10 | config.vm.box = "esxi55" 11 | config.vm.synced_folder ".", "/vagrant", disabled: true 12 | config.vm.network "forwarded_port", guest: 443, host: 18443 13 | 14 | [:vmware_fusion, :vmware_workstation].each do |name| 15 | config.vm.provider name do |v,override| 16 | v.vmx["memsize"] = "4096" 17 | end 18 | end 19 | 20 | config.vm.provision "shell", privileged: false, :inline => < 1 call to BrowseLog() 24 | run govc logs -n 2002 25 | assert_success 26 | 27 | # -host ignored against ESX 28 | run govc logs -host enoent 29 | assert_success 30 | 31 | run govc logs -log enoent 32 | assert_failure 33 | } 34 | 35 | @test "logs.ls" { 36 | run govc logs.ls 37 | assert_success 38 | 39 | # -host ignored against ESX 40 | run govc logs.ls -host enoent 41 | assert_success 42 | } 43 | -------------------------------------------------------------------------------- /vendor/github.com/vmware/govmomi/govc/test/metric_info_test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | types="Datacenter HostSystem ClusterComputeResource ResourcePool VirtualMachine Datastore VirtualApp" 4 | 5 | for type in $types ; do 6 | echo "$type..." 7 | 8 | obj=$(govc ls -t "$type" ./... | head -n 1) 9 | if [ -z "$obj" ] ; then 10 | echo "...no instances found" 11 | continue 12 | fi 13 | 14 | if ! govc metric.info "$obj" 2>/dev/null ; then 15 | echo "...N/A" # Datacenter, Datastore on ESX for example 16 | continue 17 | fi 18 | 19 | govc metric.ls "$obj" | xargs govc metric.sample -n 5 "$obj" 20 | done 21 | -------------------------------------------------------------------------------- /vendor/github.com/vmware/govmomi/govc/test/session.bats: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bats 2 | 3 | load test_helper 4 | 5 | @test "session.ls" { 6 | run govc session.ls 7 | assert_success 8 | 9 | run govc session.ls -json 10 | assert_success 11 | 12 | # Test User-Agent 13 | govc session.ls | grep "$(govc version | tr ' ' /)" 14 | } 15 | 16 | @test "session.rm" { 17 | run govc session.rm enoent 18 | assert_failure 19 | assert_output "govc: ServerFaultCode: The object or item referred to could not be found." 20 | 21 | # Can't remove the current session 22 | id=$(govc session.ls -json | jq -r .CurrentSession.Key) 23 | run govc session.rm "$id" 24 | assert_failure 25 | 26 | thumbprint=$(govc about.cert -thumbprint) 27 | # persist session just to avoid the Logout() so we can session.rm below 28 | dir=$(mktemp -d govc-test-XXXXX) 29 | 30 | id=$(GOVMOMI_HOME="$dir" govc session.ls -json -k=false -persist-session -tls-known-hosts <(echo "$thumbprint") | jq -r .CurrentSession.Key) 31 | 32 | rm -rf "$dir" 33 | 34 | run govc session.rm "$id" 35 | assert_success 36 | } 37 | -------------------------------------------------------------------------------- /vendor/github.com/vmware/govmomi/govc/test/vcsim/Vagrantfile: -------------------------------------------------------------------------------- 1 | # -*- mode: ruby -*- 2 | # vi: set ft=ruby : 3 | 4 | # VCSA with VC simulator enabled. 5 | # 'vagrant provision' will erase any existing inventory and 6 | # populate with the config in ./provision.sh 7 | 8 | Vagrant.configure("2") do |config| 9 | config.vm.hostname = "vcsim" 10 | 11 | config.vm.box = "vcsa" 12 | config.vm.synced_folder ".", "/vagrant", disabled: true 13 | 14 | config.vm.provision "shell", path: "provision.sh" 15 | 16 | config.vm.network "forwarded_port", guest: 443, host: 16443 17 | config.vm.network "forwarded_port", guest: 80, host: 16080 18 | 19 | [:vmware_fusion, :vmware_workstation].each do |name| 20 | config.vm.provider name do |v,override| 21 | v.vmx["memsize"] = "4096" 22 | end 23 | end 24 | end 25 | -------------------------------------------------------------------------------- /vendor/github.com/vmware/govmomi/govc/test/vcsim/provision.sh: -------------------------------------------------------------------------------- 1 | PATH=$PATH:/sbin:/usr/sbin:/usr/local/sbin 2 | 3 | echo "Creating vcsim model..." 4 | cat > /etc/vmware-vpx/vcsim/model/initInventory-govc.cfg < 6 | 7 | 2 8 | 3 9 | 3 10 | 2 11 | 2 12 | 3 13 | 3 14 | 4 15 | 3 16 | 2 17 | 18 | 19 | EOF 20 | 21 | cat > /etc/vmware-vpx/vcsim/model/vcsim-default.cfg < 23 | true 24 | vcsim/model/initInventory-govc.cfg 25 | 26 | EOF 27 | 28 | echo "Starting VC simulator..." 29 | vmware-vcsim-stop 30 | vmware-vcsim-start default 31 | -------------------------------------------------------------------------------- /vendor/github.com/vmware/govmomi/object/cluster_compute_resource_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2015 VMware, Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package object 18 | 19 | // ComputeResource should implement the Reference interface. 20 | var _ Reference = ClusterComputeResource{} 21 | -------------------------------------------------------------------------------- /vendor/github.com/vmware/govmomi/object/common_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2016 VMware, Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package object 18 | 19 | import "testing" 20 | 21 | func TestCommonName(t *testing.T) { 22 | c := &Common{} 23 | 24 | name := c.Name() 25 | if name != "" { 26 | t.Errorf("Name=%s", name) 27 | } 28 | 29 | c.InventoryPath = "/foo/bar" 30 | name = c.Name() 31 | if name != "bar" { 32 | t.Errorf("Name=%s", name) 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /vendor/github.com/vmware/govmomi/object/compute_resource_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2015 VMware, Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package object 18 | 19 | // ComputeResource should implement the Reference interface. 20 | var _ Reference = ComputeResource{} 21 | -------------------------------------------------------------------------------- /vendor/github.com/vmware/govmomi/object/datacenter_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2015 VMware, Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package object 18 | 19 | // Datacenter should implement the Reference interface. 20 | var _ Reference = Datacenter{} 21 | -------------------------------------------------------------------------------- /vendor/github.com/vmware/govmomi/object/datastore_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2015 VMware, Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package object 18 | 19 | // Datastore should implement the Reference interface. 20 | var _ Reference = Datastore{} 21 | -------------------------------------------------------------------------------- /vendor/github.com/vmware/govmomi/object/distributed_virtual_portgroup_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2015 VMware, Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package object 18 | 19 | // DistributedVirtualPortgroup should implement the Reference interface. 20 | var _ Reference = DistributedVirtualPortgroup{} 21 | 22 | // DistributedVirtualPortgroup should implement the NetworkReference interface. 23 | var _ NetworkReference = DistributedVirtualPortgroup{} 24 | -------------------------------------------------------------------------------- /vendor/github.com/vmware/govmomi/object/folder_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2015 VMware, Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package object 18 | 19 | // Folder should implement the Reference interface. 20 | var _ Reference = Folder{} 21 | -------------------------------------------------------------------------------- /vendor/github.com/vmware/govmomi/object/network_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2015 VMware, Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package object 18 | 19 | // Network should implement the Reference interface. 20 | var _ Reference = Network{} 21 | 22 | // Network should implement the NetworkReference interface. 23 | var _ NetworkReference = Network{} 24 | -------------------------------------------------------------------------------- /vendor/github.com/vmware/govmomi/object/storage_pod.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2015 VMware, Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package object 18 | 19 | import ( 20 | "github.com/vmware/govmomi/vim25" 21 | "github.com/vmware/govmomi/vim25/types" 22 | ) 23 | 24 | type StoragePod struct { 25 | *Folder 26 | } 27 | 28 | func NewStoragePod(c *vim25.Client, ref types.ManagedObjectReference) *StoragePod { 29 | return &StoragePod{ 30 | Folder: &Folder{ 31 | Common: NewCommon(c, ref), 32 | }, 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /vendor/github.com/vmware/govmomi/object/vmware_distributed_virtual_switch.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2015 VMware, Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package object 18 | 19 | type VmwareDistributedVirtualSwitch struct { 20 | DistributedVirtualSwitch 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/vmware/govmomi/ovf/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2015 VMware, Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | /* 18 | Package ovf provides functionality to unmarshal and inspect the structure 19 | of an OVF file. It is not a complete implementation of the specification and 20 | is intended to be used to import virtual infrastructure into vSphere. 21 | 22 | For a complete specification of the OVF standard, refer to: 23 | https://www.dmtf.org/sites/default/files/standards/documents/DSP0243_2.1.0.pdf 24 | */ 25 | package ovf 26 | -------------------------------------------------------------------------------- /vendor/github.com/vmware/govmomi/ovf/ovf.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2015 VMware, Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package ovf 18 | 19 | import ( 20 | "encoding/xml" 21 | "io" 22 | ) 23 | 24 | func Unmarshal(r io.Reader) (*Envelope, error) { 25 | var e Envelope 26 | 27 | dec := xml.NewDecoder(r) 28 | err := dec.Decode(&e) 29 | if err != nil { 30 | return nil, err 31 | } 32 | 33 | return &e, nil 34 | } 35 | -------------------------------------------------------------------------------- /vendor/github.com/vmware/govmomi/scripts/.gitignore: -------------------------------------------------------------------------------- 1 | .wireshark-* 2 | -------------------------------------------------------------------------------- /vendor/github.com/vmware/govmomi/scripts/contributors.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | file="$(git rev-parse --show-toplevel)/CONTRIBUTORS" 4 | 5 | cat < "$file" 6 | # People who can (and typically have) contributed to this repository. 7 | # 8 | # This script is generated by $(basename "$0") 9 | # 10 | 11 | EOF 12 | 13 | git log --format='%aN <%aE>' | sort -uf >> "$file" 14 | -------------------------------------------------------------------------------- /vendor/github.com/vmware/govmomi/scripts/debug-xmlformat.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | # pipe the most recent debug run to xmlformat 4 | cd ${GOVC_DEBUG_PATH-"$HOME/.govmomi/debug"} 5 | cd $(ls -t | head -1) 6 | 7 | header() { 8 | printf "\n" "$1" "$PWD" "$2" "$(tr -d '\r' < "$3")" 9 | } 10 | 11 | for file in *.req.xml; do 12 | base=$(basename "$file" .req.xml) 13 | header Request "$file" "${base}.req.headers" 14 | xmlformat < "$file" 15 | file="${base}.res.xml" 16 | header Response "$file" "${base}.res.headers" 17 | xmlformat < "$file" 18 | done 19 | -------------------------------------------------------------------------------- /vendor/github.com/vmware/govmomi/scripts/headers/go.txt: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) ${YEARS} VMware, Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | -------------------------------------------------------------------------------- /vendor/github.com/vmware/govmomi/scripts/headers/rb.txt: -------------------------------------------------------------------------------- 1 | # Copyright (c) ${YEARS} VMware, Inc. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | -------------------------------------------------------------------------------- /vendor/github.com/vmware/govmomi/scripts/vagrant/vcsa/.gitignore: -------------------------------------------------------------------------------- 1 | *.box 2 | *.ova 3 | .vagrant 4 | -------------------------------------------------------------------------------- /vendor/github.com/vmware/govmomi/scripts/vagrant/vcsa/Vagrantfile: -------------------------------------------------------------------------------- 1 | # -*- mode: ruby -*- 2 | # vi: set ft=ruby : 3 | 4 | # Using the VCSA base box, no provisioning, inventory will be empty. 5 | 6 | Vagrant.configure("2") do |config| 7 | config.vm.hostname = "vcsa" 8 | 9 | config.vm.box = "vcsa" 10 | config.vm.synced_folder ".", "/vagrant", disabled: true 11 | 12 | config.vm.network "forwarded_port", guest: 443, host: 16443 13 | end 14 | -------------------------------------------------------------------------------- /vendor/github.com/vmware/govmomi/scripts/vagrant/vcsa/vagrant.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | useradd vagrant -m -s /bin/bash 4 | groupmod -A vagrant wheel 5 | 6 | echo "vagrant ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers 7 | 8 | mkdir ~vagrant/.ssh 9 | wget --no-check-certificate \ 10 | https://raw.githubusercontent.com/mitchellh/vagrant/master/keys/vagrant.pub \ 11 | -O ~vagrant/.ssh/authorized_keys 12 | chown -R vagrant ~vagrant/.ssh 13 | chmod -R go-rwsx ~vagrant/.ssh 14 | 15 | sed -i -e 's/^#UseDNS yes/UseDNS no/' /etc/ssh/sshd_config 16 | sed -i -e 's/^AllowTcpForwarding no//' /etc/ssh/sshd_config 17 | sed -i -e 's/^PermitTunnel no//' /etc/ssh/sshd_config 18 | sed -i -e 's/^MaxSessions 1//' /etc/ssh/sshd_config 19 | 20 | # disable password expiration 21 | for uid in root vagrant; do 22 | chage -I -1 -E -1 -m 0 -M -1 $uid 23 | done 24 | -------------------------------------------------------------------------------- /vendor/github.com/vmware/govmomi/task/error.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2015 VMware, Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package task 18 | 19 | import "github.com/vmware/govmomi/vim25/types" 20 | 21 | type Error struct { 22 | *types.LocalizedMethodFault 23 | } 24 | 25 | // Error returns the task's localized fault message. 26 | func (e Error) Error() string { 27 | return e.LocalizedMethodFault.LocalizedMessage 28 | } 29 | 30 | func (e Error) Fault() types.BaseMethodFault { 31 | return e.LocalizedMethodFault.Fault 32 | } 33 | -------------------------------------------------------------------------------- /vendor/github.com/vmware/govmomi/test/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2015 VMware, Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | /* 18 | Package test contains functions that implement common functionality between 19 | tests. The code (non-test) in this package intentionally does not take any 20 | dependendies outside the vim25 tree. 21 | */ 22 | package test 23 | -------------------------------------------------------------------------------- /vendor/github.com/vmware/govmomi/vim25/mo/entity.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2016 VMware, Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package mo 18 | 19 | // Entity is the interface that is implemented by all managed objects 20 | // that extend ManagedEntity. 21 | type Entity interface { 22 | Reference 23 | Entity() *ManagedEntity 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/vmware/govmomi/vim25/mo/fixtures/cluster_host_property.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | domain-c7 5 | 6 | host 7 | 8 | host-14 9 | host-17 10 | host-19 11 | host-52 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /vendor/github.com/vmware/govmomi/vim25/mo/fixtures/hostsystem_list_name_property.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | host-10 5 | 6 | name 7 | host-01.example.com 8 | 9 | 10 | 11 | host-30 12 | 13 | name 14 | host-02.example.com 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /vendor/github.com/vmware/govmomi/vim25/mo/fixtures/nested_property.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | vm-411 5 | 6 | config.name 7 | kubernetes-master 8 | 9 | 10 | config.uuid 11 | 422ec880-ab06-06b4-23f3-beb7a052a4c9 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /vendor/github.com/vmware/govmomi/vim25/mo/fixtures/pointer_property.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | vm-411 5 | 6 | config.bootOptions 7 | 8 | 0 9 | false 10 | false 11 | 10000 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /vendor/github.com/vmware/govmomi/vim25/mo/reference.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2015 VMware, Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package mo 18 | 19 | import "github.com/vmware/govmomi/vim25/types" 20 | 21 | // Reference is the interface that is implemented by all the managed objects 22 | // defined in this package. It specifies that these managed objects have a 23 | // function that returns the managed object reference to themselves. 24 | type Reference interface { 25 | Reference() types.ManagedObjectReference 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/vmware/govmomi/vim25/mo/registry.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014 VMware, Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package mo 18 | 19 | import "reflect" 20 | 21 | var t = map[string]reflect.Type{} 22 | -------------------------------------------------------------------------------- /vendor/github.com/vmware/govmomi/vim25/progress/report.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014 VMware, Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package progress 18 | 19 | // Report defines the interface for types that can deliver progress reports. 20 | // Examples include uploads/downloads in the http client and the task info 21 | // field in the task managed object. 22 | type Report interface { 23 | Percentage() float32 24 | Detail() string 25 | Error() error 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/vmware/govmomi/vim25/types/base.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014 VMware, Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package types 18 | 19 | type AnyType interface{} 20 | -------------------------------------------------------------------------------- /vendor/github.com/vmware/govmomi/vim25/types/fault.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2015 VMware, Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package types 18 | 19 | type HasFault interface { 20 | Fault() BaseMethodFault 21 | } 22 | 23 | func IsFileNotFound(err error) bool { 24 | if f, ok := err.(HasFault); ok { 25 | switch f.Fault().(type) { 26 | case *FileNotFound: 27 | return true 28 | } 29 | } 30 | 31 | return false 32 | } 33 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/.gitattributes: -------------------------------------------------------------------------------- 1 | # Treat all files in this repo as binary, with no git magic updating 2 | # line endings. Windows users contributing to Go will need to use a 3 | # modern version of git and editors capable of LF line endings. 4 | # 5 | # We'll prevent accidental CRLF line endings from entering the repo 6 | # via the git-review gofmt checks. 7 | # 8 | # See golang.org/issue/9281 9 | 10 | * -text 11 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/.gitignore: -------------------------------------------------------------------------------- 1 | # Add no patterns to .hgignore except for files generated by the build. 2 | last-change 3 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/AUTHORS: -------------------------------------------------------------------------------- 1 | # This source code refers to The Go Authors for copyright purposes. 2 | # The master list of authors is in the main Go distribution, 3 | # visible at http://tip.golang.org/AUTHORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This source code was written by the Go contributors. 2 | # The master list of contributors is in the main Go distribution, 3 | # visible at http://tip.golang.org/CONTRIBUTORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/README.md: -------------------------------------------------------------------------------- 1 | # Go Networking 2 | 3 | This repository holds supplementary Go networking libraries. 4 | 5 | ## Download/Install 6 | 7 | The easiest way to install is to run `go get -u golang.org/x/net`. You can 8 | also manually git clone the repository to `$GOPATH/src/golang.org/x/net`. 9 | 10 | ## Report Issues / Send Patches 11 | 12 | This repository uses Gerrit for code changes. To learn how to submit 13 | changes to this repository, see https://golang.org/doc/contribute.html. 14 | The main issue tracker for the net repository is located at 15 | https://github.com/golang/go/issues. Prefix your issue with "x/net:" in the 16 | subject line, so it is easy to find. 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/bpf/setter.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package bpf 6 | 7 | // A Setter is a type which can attach a compiled BPF filter to itself. 8 | type Setter interface { 9 | SetBPF(filter []RawInstruction) error 10 | } 11 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/bpf/testdata/all_instructions.bpf: -------------------------------------------------------------------------------- 1 | 50,0 0 0 42,1 0 0 42,96 0 0 3,97 0 0 3,48 0 0 42,40 0 0 42,32 0 0 42,80 0 0 42,72 0 0 42,64 0 0 42,177 0 0 42,128 0 0 0,32 0 0 4294963200,32 0 0 4294963204,32 0 0 4294963256,2 0 0 3,3 0 0 3,4 0 0 42,20 0 0 42,36 0 0 42,52 0 0 42,68 0 0 42,84 0 0 42,100 0 0 42,116 0 0 42,148 0 0 42,164 0 0 42,12 0 0 0,28 0 0 0,44 0 0 0,60 0 0 0,76 0 0 0,92 0 0 0,108 0 0 0,124 0 0 0,156 0 0 0,172 0 0 0,132 0 0 0,5 0 0 10,21 8 9 42,21 0 8 42,53 0 7 42,37 0 6 42,37 4 5 42,53 3 4 42,69 2 3 42,7 0 0 0,135 0 0 0,22 0 0 0,6 0 0 0, 2 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/codereview.cfg: -------------------------------------------------------------------------------- 1 | issuerepo: golang/go 2 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/context/ctxhttp/ctxhttp_17_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !plan9,go1.7 6 | 7 | package ctxhttp 8 | 9 | import ( 10 | "io" 11 | "net/http" 12 | "net/http/httptest" 13 | "testing" 14 | 15 | "context" 16 | ) 17 | 18 | func TestGo17Context(t *testing.T) { 19 | ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { 20 | io.WriteString(w, "ok") 21 | })) 22 | defer ts.Close() 23 | ctx := context.Background() 24 | resp, err := Get(ctx, http.DefaultClient, ts.URL) 25 | if resp == nil || err != nil { 26 | t.Fatalf("error received from client: %v %v", err, resp) 27 | } 28 | resp.Body.Close() 29 | } 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/context/go19.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build go1.9 6 | 7 | package context 8 | 9 | import "context" // standard library's context, as of Go 1.7 10 | 11 | // A Context carries a deadline, a cancelation signal, and other values across 12 | // API boundaries. 13 | // 14 | // Context's methods may be called by multiple goroutines simultaneously. 15 | type Context = context.Context 16 | 17 | // A CancelFunc tells an operation to abandon its work. 18 | // A CancelFunc does not wait for the work to stop. 19 | // After the first call, subsequent calls to a CancelFunc do nothing. 20 | type CancelFunc = context.CancelFunc 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/context/withtimeout_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package context_test 6 | 7 | import ( 8 | "fmt" 9 | "time" 10 | 11 | "golang.org/x/net/context" 12 | ) 13 | 14 | // This example passes a context with a timeout to tell a blocking function that 15 | // it should abandon its work after the timeout elapses. 16 | func ExampleWithTimeout() { 17 | // Pass a context with a timeout to tell a blocking function that it 18 | // should abandon its work after the timeout elapses. 19 | ctx, cancel := context.WithTimeout(context.Background(), 50*time.Millisecond) 20 | defer cancel() 21 | 22 | select { 23 | case <-time.After(1 * time.Second): 24 | fmt.Println("overslept") 25 | case <-ctx.Done(): 26 | fmt.Println(ctx.Err()) // prints "context deadline exceeded" 27 | } 28 | 29 | // Output: 30 | // context deadline exceeded 31 | } 32 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/html/charset/testdata/README: -------------------------------------------------------------------------------- 1 | These test cases come from 2 | http://www.w3.org/International/tests/repository/html5/the-input-byte-stream/results-basics 3 | 4 | Distributed under both the W3C Test Suite License 5 | (http://www.w3.org/Consortium/Legal/2008/04-testsuite-license) 6 | and the W3C 3-clause BSD License 7 | (http://www.w3.org/Consortium/Legal/2008/03-bsd-license). 8 | To contribute to a W3C Test Suite, see the policies and contribution 9 | forms (http://www.w3.org/2004/10/27-testcases). 10 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/html/charset/testdata/UTF-16BE-BOM.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Oxalide/vsphere-influxdb-go/dac91ccd2de8ec8cdcdd6f3edd1242761ae99da4/vendor/golang.org/x/net/html/charset/testdata/UTF-16BE-BOM.html -------------------------------------------------------------------------------- /vendor/golang.org/x/net/html/charset/testdata/UTF-16LE-BOM.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Oxalide/vsphere-influxdb-go/dac91ccd2de8ec8cdcdd6f3edd1242761ae99da4/vendor/golang.org/x/net/html/charset/testdata/UTF-16LE-BOM.html -------------------------------------------------------------------------------- /vendor/golang.org/x/net/html/example_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // This example demonstrates parsing HTML data and walking the resulting tree. 6 | package html_test 7 | 8 | import ( 9 | "fmt" 10 | "log" 11 | "strings" 12 | 13 | "golang.org/x/net/html" 14 | ) 15 | 16 | func ExampleParse() { 17 | s := `

Links:

` 18 | doc, err := html.Parse(strings.NewReader(s)) 19 | if err != nil { 20 | log.Fatal(err) 21 | } 22 | var f func(*html.Node) 23 | f = func(n *html.Node) { 24 | if n.Type == html.ElementNode && n.Data == "a" { 25 | for _, a := range n.Attr { 26 | if a.Key == "href" { 27 | fmt.Println(a.Val) 28 | break 29 | } 30 | } 31 | } 32 | for c := n.FirstChild; c != nil; c = c.NextSibling { 33 | f(c) 34 | } 35 | } 36 | f(doc) 37 | // Output: 38 | // foo 39 | // /bar/baz 40 | } 41 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/html/testdata/webkit/adoption02.dat: -------------------------------------------------------------------------------- 1 | #data 2 | 12

34 3 | #errors 4 | #document 5 | | 6 | | 7 | | 8 | | 9 | | "1" 10 | | 11 | | "2" 12 | | 13 | |

14 | | 15 | | "3" 16 | | "4" 17 | 18 | #data 19 |

20 | #errors 21 | #document 22 | | 23 | | 24 | | 25 | | 26 | |
27 | | 28 | |