Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRDBMSConnection ¶
func NewRDBMSConnection(c RDBMSConfig) (*gorm.DB, error)
NewRDBMSConnection returns a DB object based on config provided
Types ¶
type InfluxDB ¶
type InfluxDB interface {
Config() InfluxDBConfig
Client() influxdb2.Client
Close()
WriteAPI() api.WriteAPI
WriteAPIBlocking() api.WriteAPIBlocking
QueryAPI(org string) api.QueryAPI
Write(s *StatusPoint)
WriteBlocking(s *StatusPoint) error
}
InfluxDB is a interface provided basic APIs
func NewInfluxDBConnection ¶
func NewInfluxDBConnection(c InfluxDBConfig) (InfluxDB, error)
NewInfluxDBConnection is used to start a InfluxDB connection
type InfluxDBConfig ¶
type InfluxDBConfig struct {
Token string
URL string
Org string
Bucket string
Options *influxdb2.Options
}
InfluxDBConfig is a Config for starting InfluxDB Connection
type RDBMSConfig ¶
type RDBMSConfig struct {
Type DBType
SQLiteConfig sqliteConfig
MySQLConfig mysqlConfig
}
RDBMSConfig is the config used to start a DB connection
type StatusPoint ¶
StatusPoint is a struct to write into InfluxDB
Click to show internal directories.
Click to hide internal directories.