clickhouse

package module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 9, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

README

clickhouse

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClickHouse

type ClickHouse interface {
	Config(dsID string) *Config
	Conn(dsID string) driver.Conn
}

func Engine

func Engine(cfg configuration.Configuration, systemId string) ClickHouse

type Config

type Config struct {
	Addr                 []string `json:"addr"`                 // ["127.0.0.1:9000"]
	Database             string   `json:"database"`             // 数据库
	Username             string   `json:"username"`             // 用户名
	Password             string   `json:"password"`             // 密码
	Debug                bool     `json:"debug"`                // 开启debug
	DialTimeout          int      `json:"dialTimeout"`          // 连接超时时间,秒
	MaxOpenConns         int      `json:"maxOpenConns"`         // 最大开放连接数
	MaxIdleConns         int      `json:"maxIdleConns"`         // 最大空闲连接数
	BlockBufferSize      uint8    `json:"blockBufferSize"`      // 块缓冲区大小
	MaxCompressionBuffer int      `json:"maxCompressionBuffer"` // 最大压缩值
	ExecTimeout          int      `json:"execTimeout"`          // 执行超时时间,秒
	ConnMaxLifetime      int      `json:"connMaxLifetime"`      // 连接最大生存时间,分
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL