Documentation ¶
Index ¶
- Constants
- func ClearServersAfterITest(db string)
- func CreateInfluxDB(db string) error
- func CreateInfluxMeasure(db, measure string, tags []*map[string]string, ...) error
- func CreateInfluxMeasureWithRP(db, rp, measure string, tags []*map[string]string, ...) error
- func CreateInfluxRP(db, rp string) error
- func CreateNonAdminInTS(user, pass string) error
- func CreateTimescaleDb(db string) error
- func CreateTimescaleSchema(db, schema string) error
- func DeleteInfluxDb(db string) error
- func DeleteTimescaleDb(db string) error
- func OpenTSConn(db string) (*pgx.Conn, error)
- func OpenTsConnWithUser(db, user, pass string) (*pgx.Conn, error)
- func PrepareServersForITest(db string) error
Constants ¶
const ( // InfluxHost is the default InfluxDB host to be used in integration tests InfluxHost = "http://localhost:8086" // TsConnStringTemplate is the conn string for the default Timescale host to be used in integration tests TsConnStringTemplate = "user=postgres password=postgres port=5433 dbname=%s sslmode=disable" )
Variables ¶
This section is empty.
Functions ¶
func ClearServersAfterITest ¶
func ClearServersAfterITest(db string)
ClearServersAfterITest Deletes a database on both the default influx and timescale servers
func CreateInfluxDB ¶
CreateInfluxDB creates a new influx database to the default influx server. Used for integration tests
func CreateInfluxMeasure ¶
func CreateInfluxMeasure(db, measure string, tags []*map[string]string, values []*map[string]interface{}) error
CreateInfluxMeasure creates a measure with the specified name. For each point the tags and field values are given as maps
func CreateInfluxMeasureWithRP ¶
func CreateInfluxMeasureWithRP(db, rp, measure string, tags []*map[string]string, values []*map[string]interface{}) error
CreateInfluxMeasureWithRP creates a measure with the specified name and specified RP. For each point the tags and field values are given as maps
func CreateInfluxRP ¶
CreateInfluxRP creates a retention policy with the specified name and 1 day duration as maps
func CreateNonAdminInTS ¶
CreateNonAdminInTS creates a user with login and password
func CreateTimescaleDb ¶
CreateTimescaleDb creates a new database on the default server and then creates the extension on it
func CreateTimescaleSchema ¶
CreateTimescaleSchema creates a new schema in the specified db
func DeleteInfluxDb ¶
DeleteInfluxDb deletes a influx database on the default influx server. Used for integration tests
func DeleteTimescaleDb ¶
DeleteTimescaleDb drops a databass on the default server
func OpenTSConn ¶
OpenTSConn opens a connection to a TimescaleDB with the default (super admin) user/pass
func OpenTsConnWithUser ¶
OpenTsConnWithUser opens a connection to a TimescaleDB with the supplied user and pass
func PrepareServersForITest ¶
PrepareServersForITest Creates a database with the same name on the default influx server and default timescale server
Types ¶
This section is empty.