Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( //ErrNoDatabaseInDsnOrInTableName is returned when inserter tries to get table's structure //and there is need in database's name and it can't be found ErrNoDatabaseInDsnOrInTableName = errors.New("no database in dsn or in table name") //ErrNoSuchTableStructure means there are no column configuration for such database and table ErrNoSuchTableStructure = errors.New("no column info for a table") )
View Source
var ErrCantParseToClickhouseType = errors.New("can't parse clickhouse type")
ErrCantParseToClickhouseType means type of value from JSON can't be converted into clickhouse's column type
Functions ¶
This section is empty.
Types ¶
type ClickHouseInserter ¶
type ClickHouseInserter struct {
// contains filtered or unexported fields
}
ClickHouseInserter inserts rows into ClickHouse
func (*ClickHouseInserter) Init ¶
func (ci *ClickHouseInserter) Init(config Config) error
Init setups ClickHouseInserter and connects to ClickHouse
type Config ¶
type Config struct { Type string `toml:"type"` Dsn string `toml:"dsn"` MaxConnections int `toml:"max_connections"` InsertTimeoutMs int `toml:"insert_timeout_ms"` }
Config is a config for inserter
type InsertErrorLogger ¶
type InsertErrorLogger struct {
// contains filtered or unexported fields
}
func NewInsertErrorLogger ¶
func NewInsertErrorLogger(w io.Writer, prettyPrint bool) *InsertErrorLogger
func NewInsertErrorLoggerFromConfig ¶
func NewInsertErrorLoggerFromConfig(config InsertErrorLoggerConfig) (*InsertErrorLogger, error)
func (*InsertErrorLogger) Close ¶
func (l *InsertErrorLogger) Close() error
type InsertErrorLoggerConfig ¶
type MysqlInserter ¶
type MysqlInserter struct {
// contains filtered or unexported fields
}
MysqlInserter inserts rows into MySQL
func (*MysqlInserter) Init ¶
func (mi *MysqlInserter) Init(config Config) error
Init setups MysqlInserter and connects to mysql
Click to show internal directories.
Click to hide internal directories.