Documentation
¶
Overview ¶
Copyright 2018 Iguazio Systems Ltd.
Licensed under the Apache License, Version 2.0 (the "License") with an addition restriction as set forth herein. You may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
In addition, you may not use the software for any purposes that are illegal under applicable law, and the grant of the foregoing license under the Apache 2.0 license is conditioned upon your compliance with such restriction.
Copyright 2018 Iguazio Systems Ltd.
Licensed under the Apache License, Version 2.0 (the "License") with an addition restriction as set forth herein. You may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
In addition, you may not use the software for any purposes that are illegal under applicable law, and the grant of the foregoing license under the Apache 2.0 license is conditioned upon your compliance with such restriction.
Index ¶
- Constants
- func CreateTestTSDB(t testing.TB, v3ioConfig *config.V3ioConfig)
- func CreateTestTSDBWithAggregates(t testing.TB, v3ioConfig *config.V3ioConfig, aggregates string)
- func DateStringToMillis(date string) (int64, error)
- func DeleteTSDB(t testing.TB, v3ioConfig *config.V3ioConfig)
- func GetV3ioConfigPath() (string, error)
- func InsertData(t *testing.T, testParams TestParams) *V3ioAdapter
- func LoadV3ioConfig() (*config.V3ioConfig, error)
- func NanosToMillis(nanos int64) int64
- func NormalizePath(path string) string
- func PrefixTablePath(tablePath string) string
- func SetUp(t testing.TB, testParams TestParams) func()
- func SetUpWithDBConfig(t *testing.T, schema *config.Schema, testParams TestParams) func()
- func SetUpWithData(t *testing.T, testOpts TestParams) (*V3ioAdapter, func())
- func ValidateCountOfSamples(t testing.TB, adapter *V3ioAdapter, metricName string, expected int, ...)
- func ValidateRawData(t testing.TB, adapter *V3ioAdapter, metricName string, ...)
- type DataPoint
- type DataPointTimeSorter
- type Metric
- type Sample
- type TestOption
- type TestParams
- type TimeSeries
Constants ¶
const DaysInMillis = 24 * HoursInMillis
const HoursInMillis = 60 * MinuteInMillis
const MinuteInMillis = 60 * 1000
const OptDropTableOnTearDown = "DropTableOnTearDown"
const OptIgnoreReason = "IgnoreReason"
const OptTimeSeries = "TimeSeries"
const OptV3ioConfig = "V3ioConfig"
const TsdbDefaultTestConfigPath = "testdata"
Variables ¶
This section is empty.
Functions ¶
func CreateTestTSDB ¶
func CreateTestTSDB(t testing.TB, v3ioConfig *config.V3ioConfig)
func CreateTestTSDBWithAggregates ¶ added in v0.8.0
func CreateTestTSDBWithAggregates(t testing.TB, v3ioConfig *config.V3ioConfig, aggregates string)
func DateStringToMillis ¶ added in v0.8.9
func DeleteTSDB ¶
func DeleteTSDB(t testing.TB, v3ioConfig *config.V3ioConfig)
func GetV3ioConfigPath ¶
This method will try and load the configuration file from several locations by the following order: 1. Environment variable named 'V3IO_TSDB_CONFIG' 2. Current package's 'testdata/v3io-tsdb-config.yaml' folder 3. $GOPATH/src/github.com/v3io/v3io-tsdb/v3io-tsdb-config.yaml
func InsertData ¶
func InsertData(t *testing.T, testParams TestParams) *V3ioAdapter
func LoadV3ioConfig ¶
func LoadV3ioConfig() (*config.V3ioConfig, error)
func NanosToMillis ¶ added in v0.8.3
func NormalizePath ¶
func PrefixTablePath ¶ added in v0.0.13
func SetUp ¶
func SetUp(t testing.TB, testParams TestParams) func()
func SetUpWithDBConfig ¶
func SetUpWithDBConfig(t *testing.T, schema *config.Schema, testParams TestParams) func()
func SetUpWithData ¶
func SetUpWithData(t *testing.T, testOpts TestParams) (*V3ioAdapter, func())
func ValidateCountOfSamples ¶
Types ¶
type DataPoint ¶
type DataPoint struct { Time int64 Value interface{} }
func IteratorToSlice ¶ added in v0.8.3
type DataPointTimeSorter ¶
type DataPointTimeSorter []DataPoint
DataPointTimeSorter sorts DataPoints by time
func (DataPointTimeSorter) Len ¶
func (a DataPointTimeSorter) Len() int
func (DataPointTimeSorter) Less ¶
func (a DataPointTimeSorter) Less(i, j int) bool
func (DataPointTimeSorter) Swap ¶
func (a DataPointTimeSorter) Swap(i, j int)
type TestOption ¶ added in v0.8.3
type TestOption struct { Key string Value interface{} }
type TestParams ¶ added in v0.8.3
type TestParams map[string]interface{}
func NewTestParams ¶ added in v0.8.3
func NewTestParams(t testing.TB, opts ...TestOption) TestParams
func (TestParams) DropTableOnTearDown ¶ added in v0.8.3
func (tp TestParams) DropTableOnTearDown() bool
func (TestParams) IgnoreReason ¶ added in v0.8.3
func (tp TestParams) IgnoreReason() string
func (TestParams) TimeSeries ¶ added in v0.8.3
func (tp TestParams) TimeSeries() TimeSeries
func (TestParams) V3ioConfig ¶ added in v0.8.3
func (tp TestParams) V3ioConfig() *config.V3ioConfig
type TimeSeries ¶ added in v0.8.3
type TimeSeries []Metric