Documentation ¶
Overview ¶
Package clickhousex Date: 2023/12/7 10:33 Author: Amu Description:
Package clickhousex Date: 2023/12/7 10:30 Author: Amu Description:
Package clickhousex Date: 2023/12/6 18:28 Author: Amu Description:
Package clickhousex Date: 2023/12/6 18:08 Author: Amu Description:
Package clickhousex Date: 2023/12/6 18:08 Author: Amu Description:
Index ¶
- type BatchOption
- type BatchProcessor
- type DB
- type Option
- func WithAddr(addr string) Option
- func WithConnMaxLifeTime(lifeTime int) Option
- func WithDatabase(dbName string) Option
- func WithDebug(debug bool) Option
- func WithDialTimeout(dialTimeout int) Option
- func WithMaxIdleConns(maxIdle int) Option
- func WithMaxOpenConns(maxOpen int) Option
- func WithPassword(password string) Option
- func WithUsername(username string) Option
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BatchOption ¶
type BatchOption func(*batchOption)
func WithBatchInterval ¶
func WithBatchInterval(interval int) BatchOption
func WithBatchSize ¶
func WithBatchSize(size int) BatchOption
func WithDB ¶
func WithDB(db *DB) BatchOption
func WithModel ¶
func WithModel(model interface{}) BatchOption
type BatchProcessor ¶
type BatchProcessor struct {
// contains filtered or unexported fields
}
func NewBatchProcessor ¶
func NewBatchProcessor(opts ...BatchOption) *BatchProcessor
func (*BatchProcessor) Add ¶
func (b *BatchProcessor) Add(item map[string]interface{}) error
func (*BatchProcessor) Start ¶
func (b *BatchProcessor) Start()
func (*BatchProcessor) Stop ¶
func (b *BatchProcessor) Stop()
type DB ¶
func (*DB) AutoMigrate ¶
type Option ¶
type Option func(*option)
func WithConnMaxLifeTime ¶
func WithDatabase ¶
func WithDialTimeout ¶
func WithMaxIdleConns ¶
func WithMaxOpenConns ¶
func WithPassword ¶
func WithUsername ¶
Click to show internal directories.
Click to hide internal directories.